Re: Question re virtual and scope of definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 (Karl Pflästerer) wrote:
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)?

More of an apache question really. The #include virtual stuff is all handled by apache, not php.

Looks like SSI's support cmd and/or exec:

http://httpd.apache.org/docs/2.2/mod/mod_include.html#element.exec

Why is an include not an option? What are you trying to achieve?

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux