You have already practically brought your answer: the file is issued using PHP.
What the browser will do with this depends on the mime type. For example, if Content-type: text / plain, then the browser will try to simply display the content. If Content-type: application / octet-stream is set (these are all binary files and files that the web server doesn’t know mime), the browser may offer to download the file (especially if Content-Disposition is set: attachment)
Therefore, the formal answer is to force text / plain and remove Content-Disposition: attachment if there is. At the same time in the browser window you will see a jumble of characters - but you can copy the url from the address bar to paste it into the browser.
However, this is a solution to the problem in the forehead. First, you see extra rubbish on the screen (moreover, if you have an audio or video file); secondly, the player may stop working with the wrong type of mime.
Consider not solving your current task, but simply outputting to the browser a list of files in a folder: this task can be solved either with PHP, or even without the code at all (setting up an Apache web server is reduced to one line).
Content-Disposition: attachment...
- this forces the browser to save the file. - Sergiks