当变量存在时,PHP输出被改变

I have the weirdest thing happening on my site. My PHP script is outputting different content depending upon whether there's a query mark (?) present or not. It doesn't matter if there is a query string present after the mark or not - the simple presence of the "?" changes the output. I didn't code anything to even look for that query mark let alone do anything differently depending upon if it found it or not. It's driving me nuts! Could there be an explanation for why this is happening?

Here are sample links: 1) ...html, 2) ...html? (The most significant changes occur in the month of March.)

EDIT: Sorry, I didn't think the code would be very helpful, and there's a ton of it. I don't think you'll be able to "recreate the issue" since this code depends on Magento to run, but here it is. (I had to strip out a lot of comments to get it under the size requirements.)

EDIT: Code removed since it wasn't useful or pertinent to finding the answer.

Sounds like a caching problem. Try clearing it out...

http://kb.siteground.com/article/How_to_clear_the_cache_in_Magento.html

Magento keeps its cache in /var/cache located inside the Magento installation directory. So, for example, if your Magento is installed in your main public_html folder, the cache will be in public_html/var/cache.

Sorry, that was not what was happening. The location remains unchanged. But it has to be one of the options that can be passed in by URL that is getting overritten. Check to see what option might make give you the same output as the non-parameter query.