Re: include() like functionality for strings
| From: | Andi Gutmans | Date: | Mon, 01 Oct 2001 23:54:33 +0000 |
| Subject: | Re: include() like functionality for strings | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-66962@lists.php.net to get a copy of this message | ||
There is no problem in getting it to work but the question is if we can do it in a nice way.
How would eval() know if it's evaling something which should start in a PHP or HTML context? You'd have to send it another argument. This would start being a bit ugly.
Is it such a big deal?
Andi
At 05:15 PM 10/1/2001 -0600, Chris Newbill wrote:
Not sure what discussion has been done on this subject before, but here it goes. I wan't to be able to use a function that does the same thing as include, except instead of passing a file name I pass the actual string to be processed. This differs from eval() because the string may be all HTML. I've seen numerous hacks on how to get this functionality out of eval() such as prepending ?> and appending <? to your string, and creating temp files to include, etc. But this is somewhat ugly. I'm certain this function could be made easily, and if no one wants to do it simply point me in the direction where to find the code for include()/include_once() and I'm sure I can make something work. -Chris -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net