Re: Downloading PHP source from a PHP filename, possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote in message
news:20031129031028.60183.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxx
> 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.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux