开发者

Problem with redirection to start secion

开发者 https://www.devze.com 2023-04-06 06:24 出处:网络
I have a problem with ... header (\"Location :\".$_ SERVER [\'HTTP_REFERER\']); 开发者_开发百科I get the following error:

I have a problem with ...

header ("Location :".$_ SERVER ['HTTP_REFERER']);
开发者_开发百科

I get the following error:

Error 310 (net:: ERR_TOO_MANY_REDIRECTS)

I'm trying to start session and where it was redirected to the user.

There are a safer alternative?


You have done an infinite loop. You are redirecting your visitor to the page where he comes from. If you open the page, it creates an infinite loop, trying to redirect itself.

Can you be more explicit in you question? With "secion" are you trying to say "session"?

Update: your code is working properly. The question is incomplete since the HTTP redirect has no relation with sessions, or users.

Maybe you can be interested in reading: PHP sessions - PHP redirects

0

精彩评论

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