You are here: Re: header("test"); does not display « PHP Programming Language « IT news, forums, messages
Re: header("test"); does not display

Posted by universalbitmapper on 03/23/06 20:21

OK I see it's looking more complicated than it really is.
I just typed a 100 lines script from a manual: PHP MySQL Apache Web
Development.
Now, near the end there are these two lines:

$url = "location: showimage.php?id=" . $lastpicid;
header( $url );

Now at runtime I get the horrible:

"Header already sent" error

As you can see, it's the header() function I'm interested in, I thought
that if I went one step at a time, I'd find out why I get this error.
That's why I tried the little script in the original post, making sure
that the call to "header()" would be the first in the php script.
I haven't got the first clue why it's possible to use "header( $url );"
near the end of a script when the specs say it should be first.
But ok, I'll do my homework and look for typos, if I get somewhere I'll
keep you posted.
(But at the end of the day I'm disappointed that "header("this is a
test");" doesn't do anything. :-) )

Many thanks for your replies.

There only one thing more stubborn than a stubborn bug
It's a stubborn debugger ( circa Compuserve )

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация