RE: [PHP] Question about passing parameter between files
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Wed, 27 Sep 2000 05:34:34 +0000 |
| Subject: | RE: [PHP] Question about passing parameter between files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17653@lists.php.net to get a copy of this message | ||
Yes, you can do that
xxx.php?edit=true&foobar=6
Remember & (the ampersand) MUST be htmlized or it won't work
eg:
echo "$PHPSELF?pos=".($pos+$count)."&file_path=$file_path";
Theres also a nice feature called $PHPSELF which is the name of the current
script, so you can code using that instead of
myscript.php?xxx
-----Original Message-----
From: Peter [mailto:pwcip@itsd.gcn.gov.hk]
Sent: September 22, 2000 12:48 PM
To: php-general@lists.php.net
Subject: [PHP] Question about passing parameter between files
Dear reader,
In php, we can pass parameter in command line simply by just typing
"xxx.php abc". Then in 'xxx.php', we only need to get $ARGV[0] and then
get "abc". However, when the php program is used as web page, it cannot
pass parameter by this. Also it can using cgi method like xxxx.cgi?abc
to pass parameter to the destination file.Can php do that?
Thanks for your attention.
Peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net