RE: [PHP] A few questions...
| From: | Chris Cocuzzo | Date: | Sun, 25 Mar 2001 23:12:02 +0000 |
| Subject: | RE: [PHP] A few questions... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45536@lists.php.net to get a copy of this message | ||
I think I just slightly unsure of how that explode() function works in this
situation...could you clarify further?
chris
-----Original Message-----
From: Jaxon [mailto:jaxon@salamander.net]
Sent: Sunday, March 25, 2001 6:06 PM
To: cuzo@mediaone.net; PHP General List (E-mail)
Subject: Re: [PHP] A few questions...
Chris,
a few answers :)
On 3/25/01 5:43 PM, "Chris Cocuzzo" <cuzo@mediaone.net> wrote:
> hey-
>
> Alright I noticed that question about URL parsing. I could've sworn I saw
> some article on PHPBuilder.com that said that instead of doing all that
> modifying with apache, you could simply write something to change the URL
> with '?' and '&' and '=' so that they symbols could be
> represented using a
> simple /, does anyone remember seeing it?...
dunno - think it's in the php.ini?
>
> In any case, I'll ask, what would be the best way to do this with
> scripting, something like str_replace() or perhaps a regular expression to
> both modify the URL and then allow pages using that modified URL to
> recognized the variable/value pairs? Or is that even possible?
You could... I'm hacking through using:
$path_array = explode('/', $REQUEST_URI);
$last_item = array_pop($path_array);
$next_to_last_item = array_pop($path_array); / item
only drawback is the positional stuff is fixed.
now I am trying to figure out how to generate my hrefs in the page to have a
matching structure....
>
> My other question is this: Sometimes I notice URL's where it looks like
> this, http://www.whatever.com/?blah=blah&d=d, or
> http://www.whatever.com/local?name=name&d=d. How is that
> done, where there
> is no file extension after the file name, or no file name at all, just a
> question mark directly after the slash?
probably the a .htaccess or apache.conf directive:
<Location /local>
ForceType application/x-httpd-php3
</Location>
This would send everything to a script called "local".
This is from: http://phpbuilder.com/columns/tim19990117.php3
hth,
regards,
jaxon
>
> thanks
> Chris
>
--
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