RE: [PHP] virtual() test
| From: | John W. Holmes | Date: | Fri, 28 Feb 2003 12:39:09 +0000 |
| Subject: | RE: [PHP] virtual() test | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137559@lists.php.net to get a copy of this message | ||
> At 03:09 28.02.2003, John W. Holmes said:
> --------------------[snip]--------------------
> >Can anyone with Apache verify that you can pass arguments inside of a
> >virtual() call? Something like:
> >
> >Virtual("script.pl?id=1")
> >
> >And have $id available within script.pl.
> >
> >I don't have access to an Apache server right now to test, so thank
you
> >very much.
> --------------------[snip]--------------------
>
> Nope - doesn't work (Apache 1.327, PHP 4.2.3). Here's a URL for you to
> check this out:
> http://www.vogelsinger.at/test.php
>
> Basically the test.php offers you the choice to either virtual() or
> readfile() an external file, passing URI parameters. As you can see
when
> using virtual() the callee has the same environment as the caller,
however
> using readfile() via HTTP everything works as expected.
You're not supposed to use virtual() to include a PHP script. It looks
like what you have works, either way, though.
If you use virtual() to call up a perl or some other cgi script that
isn't PHP, and you use something like:
Virtual("script.pl?id=1");
Is $id available in any way to the Perl script??
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/