FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » General Chit Chat » 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI' [message #23985] Thu, 07 April 2005 03:37 Go to next message
kenjb is currently offline  kenjb   United States
Messages: 67
Registered: September 2004
Karma: 0
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:
  1. Today's Messages
  2. Unread Messages
  3. 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
Re: 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI' [message #24002 is a reply to message #23985] Thu, 07 April 2005 16:46 Go to previous message
kenjb is currently offline  kenjb   United States
Messages: 67
Registered: September 2004
Karma: 0
Member
I just detect the query string in the url now and then ignore it and check for my forum path in the url for the logic. I ignore the query string part of the url output.

Something different about those three links though and the way the string output is made, or something. I took a quick look at it, at the moment I’m to lazy to see what the difference is.


kenjb
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can i do this?
Next Topic: Open some topics here for egroupware??
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 22 09:05:14 GMT 2024

Total time taken to generate the page: 0.02552 seconds