Simon Coggins wrote:
Hi, After lots of looking I've worked out I can't use heredoc for what I want. Does anyone else have any better ideas on how to do this:
I have a template file that is used to generate a html page. in this template I currently have:
$body = <<<EOF possibly any type of text as it's an email message body EOF;
I then do some operations on this text and print out the result.
My problem is that heredoc parses variables, so if the email happends to contain a string that looks like or is php variables it all goes wrong. Plus it means someone could intentionaly start echoing variables.
I need some way of putting a block of text into a variable without
having to read it in from a file. From the template point of view, all
that happends is a token is replaced with the body of the text. So
reading that in from a file is hard.
Thanks
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php