Question re virtual and scope of definitions

From: Date: Wed, 04 Jul 2007 19:02:53 +0000
Subject: Question re virtual and scope of definitions
Groups: php.general 
Request: Send a blank email to php-general+get-258274@lists.php.net to get a copy of this message
Hi, today I wanted to use virtual (an `include' wasn't an option) to get the output from another PHP script. I got errors about functions being already defined, which is true since in both scripts are functions of the same name. I always thought virtual makes an Apache subrequest which gives me a new PHP environment. But similar to include the definitions from script1 are also in the scope of script2. Is this the wanted behaviour? If so, how could I insert the output from another PHP script (I could fetch it with curl or wget but that's the last thing I would like to do)?. What if I inserted with virtual another .html file which in turn uses mod_include to insert with <!--#include virtual ...--> the PHP script (sounds like loop the loop)? KP

« previous php.general (#258274) next »