Re: [PHP] Alternate way of calling php scripts
I think you think to the GET method : http://www.mysite.com/script.php?your=mom At 06:13 08/08/01 -0700, Evan Nemerson wrote: I seem to recall that you can call a PHP script with a slash after it then variables. For instance http://localhost/script.php/your=mom. I can't find it in the manual, and was wondering if anyone knows how it works. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] EuroVox 4, place FĂ©lix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Alternate way of calling php scripts
It works pretty much as you described. :) Make a script like that and run phpinfo() from it and you'll see all the variations on $PHP_SELF and $HTTP_SERVER_VARS[] that allow you to retrieve the extra parameters from the URL. Note that if your page displays images, you'll need to include a base href=... tag to stop the browser from getting confused. I use this all over the place and it works great. There's also a variant with the Apache ForceType directive that allows you to just do stuff like www.mysite.com/myscript/foo/bar/123 where 'myscript' is really a php file. It's well-discussed in the archives and at phpbuilder. - Tim http://www.phptemplates.org On 08 Aug 2001 06:13:14 -0700, Evan Nemerson wrote: I seem to recall that you can call a PHP script with a slash after it then variables. For instance http://localhost/script.php/your=mom. I can't find it in the manual, and was wondering if anyone knows how it works. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Alternate way of calling php scripts
I play with this lots, good fun.. html head titlePath: ?=$PATH_INFO?/title /head /html the title of the page will contain the path you typed.. Twigman... On 2001.08.08 23:13 Evan Nemerson wrote: I seem to recall that you can call a PHP script with a slash after it then variables. For instance http://localhost/script.php/your=mom. I can't find it in the manual, and was wondering if anyone knows how it works. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Alternate way of calling php scripts
Thanks Tim and Daniel. $PATH_INFO works perfectly. The really nice thing is I can have a form post to it... Also good call with the base href. I would probably have forgotten it and just used absolute links. -Evan Nemerson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]