Categorized | PHP

How do you download a .php file from its location using the browser address bar?

Posted on 19 February 2010 by Abidoon

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!

Tags | , , , , , , ,

6 Responses to “How do you download a .php file from its location using the browser address bar?”

  1. Daniel B says:

    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.

  2. Underground says:

    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.

  3. Tobekeru says:

    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.

  4. kaydell says:

    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.

  5. AHMED REAZ says:

    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

  6. mcm1251595151 says:

    Use FTP


Leave a Reply

 

February 2010
M T W T F S S
« Oct   Mar »
1234567
891011121314
15161718192021
22232425262728