[thelist] Re: HOWTO read PHP source code into a textarea

Tim Burgan email at timburgan.com
Fri Feb 25 15:55:52 CST 2005


> <?
> $str = file_get_contents('nav.php');
> echo "<textarea name=code>{$str}</textarea>";
> ?>

Thanks Jamie.

I was trying to use file(), with some problems.. then I was reading the 
PHP manual for a different issue, when I stumbled across 
file_get_contents(). Perfect! You're right, it works really well.

Thanks

Tim




More information about the thelist mailing list