October 25th, 2000, 06:12 AM
I have a script where I use some PHP in the beginning (between the <head> tags). But then I want to disable further parsing of the script, but still wite out the rest of the html-code.
So, if I later write some php code, it'll be written out just as it is, not be parsed. exit() or die() doesn't work in this case.
Can anybody please help me?
October 25th, 2000, 06:16 AM
do you mean you want to display the PHP as text in the browser? - if so use
<? echo htmlspecialchars(<? echo "this will be printed to screen etc";?> );?>
October 25th, 2000, 06:30 AM
yes, I want to print the PHP code as text, but still get the html-code right.
If I do as you said, the <> around the html-tags will becode > and stuff like that...
So what i want is the PHP engine to stop looking for PHP scripts in the file...
Any new ideas?
October 25th, 2000, 07:08 AM
Just do it with html
and use the.. erm i guess code tag, or
pre tag like:
function.. etc u get the point
and leave the <?php out of that tag
October 25th, 2000, 12:13 PM
Thanks, but no, that's not good enough...
Since I don't know what's going to be in the body of the file, I can't use the <pre> tag.
The rest of the document is taken out of a database, and I can't controll what people write in it...
So, what I need is a command which stops the rest of the PHP execution in the document, but still returns all the HTML code...