Re: [PHP4BETA] Include vs exec

From: Date: Tue, 04 Jan 2000 16:53:55 +0000
Subject: Re: [PHP4BETA] Include vs exec
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-8909@lists.php.net to get a copy of this message
CC>> Ps just for clarity, (it is past 4am here ;/) what im looking to CC>> do is basicly a include on a $string instead of a file name, CC>> thus loading the string directly into the php parser, and CC>> skiping the file save's/load's... this way one could do CC>> $title = "dummy"; CC>> $s = "<html><head><title><? echo "$title"; CC>> ?></title></head></html>"; CC>> string_include($s); If fact, you can do eval("?>$s<?"); The PHP braces are needed because eval apparently thinks it's PHP code already (while include doesn't). At least, it works with my example :) Though, it's also a performance hit - you get the string reparsed. However, if you wan PHP to get through it, you have no choice. -- Stanislav Malyshev stas@zend.com +972-3-6139665

« previous php.version4 (#8909) next »