[thelist] HOWTO read PHP source code into a textarea

Christian Heilmann lists at onlinetools.org
Thu Feb 24 19:05:34 CST 2005


Tim Burgan wrote:

> Hello,
>
>
> I have a file 'nav.php', whose source code I want to load into the 
> textarea on page 'aaa.php', so the source can be edited and changed.
>
> Is there a resource that I can read to help me do this?

You can load the code into the textarea  via the fread() function. to 
make it editable, you'd need to give write permissions to it and write a 
script that overwrites the original file.
Not hard to do, but rather unsafe.





More information about the thelist mailing list