Oh wait, just do this in my page :
URL -> index.php/main/1/pagename.html
$path_array = explode('/', $REQUEST_URI);
$tpl = $path_array[0];
$ii = $path_array[1];
$pagename = $path_array[2];
that works - sorry for being obtuse.
regards,
jaxon
On 3/23/01 9:30 PM, "Jaxon" <[EMAIL PROTECTED]> wrote:
>
> Well assuming that this: index.php/tpl/main/ii/1/pagename/name.html
> is representative of this: index.php?tpl=main&ii=1$pagename=name.html
>
> then:
>
> $path_array = explode('/', $REQUEST_URI);
> $numPathElements = count($path_array);
>
> gives me:
>
> $path_array[0] = tpl
> $path_array[1] = main
> $path_array[2] = ii
> $path_array[3] = 1
> $path_array[4] = pagename
> $path_array[5] = name.html
>
> But can I make that:
>
> $path_array[tpl] = main
> $path_array[ii] = 1
> $path_array[pagename] = name.html
>
> Instead?
>
> I'm going to have to do this for every page, so I want to avoid much that
> would slow the page down - what do folks think?
>
> regards,
> jaxon
>
>
>
>
> On 3/23/01 9:09 PM, "Aaron Tuller" <[EMAIL PROTECTED]> wrote:
>
>> super easy.
>>
>> $path_array = explode('/', $REQUEST_URI);
>> $numPathElements = count($path_array);
>>
>> then loop through the elements and do what you need, you might need
>> to use strtok() if you're expecting slashes in your arguments.
>>
>> -aaron
>>
>> At 8:58 PM -0500 3/23/01, Jaxon wrote:
>>> how about parsing a url from passing variables like :
>>> test.php/op/3/op2/6/pagename.html
>>>
>>> cannot this be parsed, to let search engines spider past the "?" properly?
>>>
>>> regards,
>>> jaxon
>>>
>>> On 3/23/01 7:46 PM, "Richard Lynch" <[EMAIL PROTECTED]> wrote:
>>>
>>>> I think you can change the separator in php.ini, and for sure you could do
>>>> it by hand using $PATH_INFO or something.
>>>>
>>>> Personally, my first question would be if the new "standard" is actually
>>>> being used or supported by anybody else...
>>>>
>>>> --
>>>> Visit the Zend Store at http://www.zend.com/store/
>>>> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
>>>> Volunteer a little time: http://chatmusic.com/volunteer.htm
>>>> ----- Original Message -----
>>>> From: Dave Smith <[EMAIL PROTECTED]>
>>>> Newsgroups: php.general
>>>> Sent: Saturday, March 17, 2001 10:55 AM
>>>> Subject: [PHP] URL parsing
>>>>
>>>>
>>>>> I have heard that the new standard for URLS is ...test.php?op=3;op2=6...
>>>>> using the semi colon as a seperator. Is this currently supported by php
>>>> 4.0.3?
>>>>>
>>>>> Cheers
>>>>>
>>>>> Dave Smith
>>
>
--
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]