Hi,

Friday, February 28, 2003, 10:41:24 PM, you wrote:
>> TR> Friday, February 28, 2003, 12:09:30 PM, you wrote:
>> JWH>> Can anyone with Apache verify that you can pass arguments inside
JWH> of
>> a
>> JWH>> virtual() call? Something like:
>> 
>> JWH>> Virtual("script.pl?id=1")
>> 
>> JWH>> And have $id available within script.pl.
>> 
>> JWH>> I don't have access to an Apache server right now to test, so
JWH> thank
>> you
>> JWH>> very much.
>> 
>> JWH>> ---John W. Holmes...
>> 
>> JWH>> PHP Architect - A monthly magazine for PHP Professionals. Get
JWH> your
>> copy
>> JWH>> today. http://www.phparch.com/
>> 
>> 
>> TR> it shows up under
>> TR> _SERVER["QUERY_STRING"] => id=1
>> 
>> TR> I ran the following script (virt) in cgi-bin
>> 
>> TR> #!/usr/bin/php
>> TR> <?php
>> TR> header('Content-type: text/plain');
>> TR> echo "\n";
>> TR> echo 'Test script report';
>> TR> phpinfo(32);
>> ?>>
>> 
>> TR> Then virtual('/cgi-bin/virt?id=1');
>> 
>> TR> --
>> TR> regards,
>> TR> Tom
>> 
>> 
>> 
>> That would be
>> 
>> echo QUERY_STRING = "$QUERY_STRING"
>> 
>> in perl

JWH> So that's a YES, right? There's some way you could get that variable
JWH> back, probably by parsing the $QUERY_STRING variable in Perl? I'm really
JWH> not familiar with Perl, either, so I'm taking your word for it. :)

JWH> ---John W. Holmes...

JWH> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
JWH> today. http://www.phparch.com/

Yes thats a yes, I don't do much with perl but I guess you can chop up
the query string just like php. Here is a dump of the perl test.


SERVER_SOFTWARE = Apache/1.3.27 (Unix) PHP/4.3.0
SERVER_NAME = xxx.xxx.com
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = INCLUDED
SERVER_PORT = 80
REQUEST_METHOD = GET
HTTP_ACCEPT = */*
PATH_INFO = 
PATH_TRANSLATED = 
SCRIPT_NAME = /cgi-bin/test-cgi
QUERY_STRING = id=7
REMOTE_HOST =
REMOTE_ADDR = 203.51.xxx.xxx
REMOTE_USER =
AUTH_TYPE =
CONTENT_TYPE =
CONTENT_LENGTH =

I used (?id=7)

-- 
regards,
Tom


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

Reply via email to