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:[EMAIL PROTECTED]]
Sent: Sunday, March 25, 2001 6:06 PM
To: [EMAIL PROTECTED]; PHP General List (E-mail)
Subject: Re: [PHP] A few questions...
Chris,
a few answers :)
On 3/25/01 5:43 PM, "Chris Cocuzzo" <[EMAIL PROTECTED]> 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: [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]