|
Re: pathinfo problem [message #18124 is a reply to message #18120] |
Mon, 10 May 2004 12:53 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
It could very well be a bug in the old PHP version or misconfiguration in apache or PHP.
FUDforum Core Developer
|
|
|
|
Re: pathinfo problem [message #31412 is a reply to message #18131] |
Fri, 21 April 2006 09:36 |
richardlynch
Messages: 8 Registered: April 2006
Karma: 0
|
Junior Member |
|
|
Personally, I've always found the HTML BASE thing to be kinda flaky...
pathinfo() as a function may be "new" in PHP, but I'm pretty sure the data has always been there in $_SERVER.
You may want to compare the two, but that probably won't help -- But would if you needed it in older versions.
What the browser shows in the status bar on mouse-over, and what the browser decides to send you to not matching up sounds like a browser bug to me...
And it's probably caused by the BASE, not by PHP.
The first thing I would test would be to use full, complete, absolute URLs with everything from http:// all the way to .html in them.
That gives the browser no leeway to mess up.
PS I use pathinfo a TON as well, and would suggest you consider using:
/cat_id=1/category_name.html
This makes it MUCH easier to tear apart pathinfo() as you can explode on / and then on = to get your key/value pair -- plus you can add as many key/value pairs as you want and not worry about the position of them getting confusing.
You could even end up with something like:
/cat_id=1/product_id=5/subdir/category_name.html
And it's quite easy to detect the parts with no '=' and use those as a path to your internal data directory structure, while keeping the key=value parts easily.
I do this a lot.
|
|
|