Re: include literal

From: Date: Mon, 28 Mar 2005 20:58:01 +0000
Subject: Re: include literal
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211719@lists.php.net to get a copy of this message
Jeremy Reynolds wrote: > What if I want to include some literal test into a PHP document that I > don't want it to interpret as it loads. In particular, I am working > with XML but for the example's sake I will say PHP. Example: FYI, when you have -- on a line by itself most newsreaders think that the text that follows is your signature. So, please don't put that into a message unless your signature will follow. Now to answer your question: <?php /** DocumentB.php */ $text = file_get_contents('DocumentA.php'); echo $text; ?> -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.general (#211719) next »