Rosse asked:
Usually when you type the end of the Extension to the file (.exe .zip .doc etc) it will automatically ask to be downloaded and if you should save or open.
Usually when you type the end of the Extension to the file (.exe .zip .doc etc) it will automatically ask to be downloaded and if you should save or open.
But this does not seem to work with a php file I want to download from a server, which I found the location for. It just opens the page as blank. And no source code is in it.
So is there a way of downloading a php from directly from the browser?
Thanks!


5 Comments to 'How do you download a.php file from its location using the browser address bar?'
September 11, 2009
No. PHP files contain code that is executed on the server. Only the output of these programs is returned to the browser, not the file itself.
September 14, 2009
PHP is a server side scripting programming language. These file are put on the server where the website is hosted.
When you use php extension. PHP generates HTML code which we see in the browser. You can’t get the actual php without server permission and no any people are giving permission.
Eighter you hack the server to get the files.
September 16, 2009
As Daniel B said, PHP is executed server-side.. So the only thing you can download is the output the code produces..
It would be pretty stupid that people could download it.
September 19, 2009
If the webmaster wants you to be able to download a .php file, he or she would have to change the extension from .php to something like .zip. Then you could download the file(s) and unpack it on your own computer.
For websites that have php files enabled to be run and not to be downloaded, there is not way for you to get to the php code because the php code is run as a script.
The webmaster would have to give you a way to get the .php code.
September 21, 2009
yes of course open opera browser and paste link ending with .php
you see the code just copy it in note pad and save it with extention.php
Leave a comment