Re: Re: Submitting variables via /'s
| From: | Ashley M. Kirchner | Date: | Fri, 05 Oct 2001 23:13:03 +0000 |
| Subject: | Re: Re: Submitting variables via /'s | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70157@lists.php.net to get a copy of this message | ||
Matthew Walker wrote:
> So, can someone give me the spot to look in the documentation to find
> out how to make this switch?
Rasmus explained it earlier to me:
Nothing to it. All you really need to know is that $PATH_INFO will contain
/1/2/3 simply pick out what you need using something like:
list($arg1,$arg2,$arg3) = explode('/',$PATH_INFO);
There is nothing to change configuration-wise in either PHP or Apache.
What you can do is get a bit fancier and get rid of the .php from the URL
and use:
http://domain.com/blah/1/2/3
In your Apache config you would use:
<Location "/blah">
ForceType application/x-httpd-php
</Location>
And then you would simply name your PHP script 'blah' and stick it in your
document root directory. But this is not needed if you are happy with:
http://domain.com/blah.php/1/2/3
Here the .php extension tells Apache that blah.php is a PHP script that
should be executed.
--
W | I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley@pcraft.com> .
303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303,
U.S.A.