开发者

Isset doesn't work after include

I'm having a very very weird issue that I'm unable to see...

I tend to have a "check" in scripts that return things through AJAX so, if you don't give it some key value to POST or GET, it won't work.

So, in my script I have this:

if (isset($_GET['end'])){

do something;
}
else
die ('You are doing it wrong');

So, having this URL:

calendarEvents.php?start=1314568800&end=1317592800&_=1316538623362

SHOULD pass the isset. In fact, if I echo the isset result or even the $_GET['end'] itself, it ouputs right. Seriously, what's wrong?

Edit: var_dump results

array
  'start' => string '1314568800' (length=10)
  'end' => string '1317592800' (length=10)
  '_' => string '1316538623362' (length=13)

Edit once again:

I'm including a file here which has another include inside. If I include both开发者_Python百科 files inside the failing file, it works, but if include ones that includes another one it fails. No inception allowed inside PHP...

BTW... Thanks for downvoting. I would like that someone explain me why a valid question with a real problem is downvoted, because don't know how to solve it?


If your url is being submitted from a webpage it might be interpreting &end as an entity and submitting an invalid url to the server.


I'm including a file here which has another include inside. If I include both files inside the failing file, it works, but if include ones that includes another one it fails. No inception allowed inside PHP...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜