don't know what i'm doing wrong take a look at this code:
instead of going to google as stated in the code, it gave me "The Page cannot be displayed" errorCode:<?
Header("Location: http://google.com");
?>
What should i do?
Printable View
don't know what i'm doing wrong take a look at this code:
instead of going to google as stated in the code, it gave me "The Page cannot be displayed" errorCode:<?
Header("Location: http://google.com");
?>
What should i do?
Could be a number fo things, first check that the heaers have not been sent it can sometimes cause problems like this :)
Cheers,
Ryan Jones
I had a problem with something like this a while ago. Try sticking \n \r at the end. Make sure there is a space between them, don't know why but it would only wokr if there was a space between them
PHP Code:<?
Header("Location: http://google.com\n \r");
?>
Hmm, I never knew you could do that - that should mean you can send multiple statements at once right?Quote:
Originally Posted by john tindell
Cheers,
Ryan Jones
But you can call the header function as many times as you need to. Just as long as nothing has been sent to the browser already.
Yes I know but what I mean is I can now use that to finish the headerBuild function I have been working on - I like everything in one place :)Quote:
Originally Posted by john tindell
Cheers,
Ryan Jones
First, try viewing the page in a nother browser. To see the real error message provided by the web server, turn off friendly HTTP errors messages in the advanced section of Internet Properties.