Re: Downloading PHP source from a PHP filename, possible?
| From: | Kim Steinhaug | Date: | Mon, 01 Dec 2003 21:48:00 +0000 |
| Subject: | Re: Downloading PHP source from a PHP filename, possible? | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31824@lists.php.net to get a copy of this message | ||
What you do is, if my logic is correct...
Read the entire file in to a variable and send it back to
the browser with another header information, typicall
TEXT.
Just like the force download method for a PDF file, or other
files. This should work very well.
--
Kim Steinhaug
---------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---------------------------------------------------------------
"Jerry" <jusa_98@yahoo.com> wrote in message
news:20031129031028.60183.qmail@web41209.mail.yahoo.com...
> Hi,
>
> I am not sure if this is at all possible but here
> goes.
>
> If a file is called blah.php and is only tailored to
> PHP code is it possible to make it downloadable either
> as a file-download or appear as plain text in a
> browser window?
>
> So if you visit blah.php it would show the PHP page
> normally and work it's functions. However is it
> possible to include a button on the page and or link
> that will actually download the PHP code to your
> computer? Keeping the filename as blah.php to save
> as.
>
> So it uses 1 file not 2, and somehow PHP functions to
> download when a button or link is clicked. Does that
> make sense?
>
> If not please reply and I'll try and explain better.
>
> Thanks for your time.
>
> Jerry
>
> http://personals.yahoo.com.au - Yahoo! Personals
> New people, new possibilities. FREE for a limited time.