Entry
How do I write a php script within a php script to a file without escaping everything?
Apr 19th, 2001 03:41
Onno Benschop, Nick N,
Cheat. The problem is that if you include the <? and ?> tags in your
output code, the PHP interpreter comes along and starts to want to
interprate the code. So don't put them together.
This example assumes that you have opened a file and that the standard
output is going to that file. I'm leaving the actual code as an
exercise to the reader :-)
<?
phpCode
echo '<' ;
echo '?' ;
?>
phpCode to include in the file
<?
echo '?' ;
echo '>' ;
?>