'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI' [message #23985] |
Thu, 07 April 2005 03:37 |
kenjb
Messages: 67 Registered: September 2004
Karma:
|
Member |
|
|
Hi there,
I was writing some php conditional statements regarding the url output for my website. Depending if the url matched particular query strings or not I would change an item or two on the page. In particular, if the forum was the current page, do not include the rdf_parser.php in the sidebar. Okay, everything seemed to work great and then I found three links on the forum that would cause the logic to break.
Those three links are:
- Today's Messages
- Unread Messages
- Unanswered messages
I’m sure I can probably figure out why those three links cause my simple logic to break, but I wound up using “>=” that fixed the problem for now. Originally I thought the strings should match exactly so I was using “==”. Off hand I think something along the lines of, maybe a space is added then removed at the end of the query string just prior to the page display or something along those lines. It is possible that php is doing what it always does and I’m just not aware of the intricacies or lack thereof, of the language. So many variables, so little time.
Can you (anyone) shed some light on this for me?
I’m not much of a programmer by any means so I’m kind of reluctant to post my hacked up code here for all to scrutinize. But, if you need to see it to possibly understand what might be different in those three links, I’ll post it.
Thanks
kenjb
|
|
|