English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

http://wayiran.persiangig.com/php.htm

I'm getting this error:
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\search.php:2) in C:\wamp\www\search.php on line 19

What should I do? can you correct my code?

2007-10-09 00:39:18 · 2 answers · asked by QuestionAnswer 2 in Computers & Internet Programming & Design

yes I know, but I cant remove this function which tries to change header... It must be there... then what should I do?

2007-10-09 00:54:47 · update #1

Thanks Cypher Team, Its working now..

2007-10-09 00:58:13 · update #2

2 answers

remove and tag from the first line
the first charecter will be
The main reson is before u calling header() function there must not be print anything on the page

try this program:
echo "hello cypher";
header("location:http://yahoo.com");
?>
this will be error

2007-10-09 00:54:35 · answer #1 · answered by Cypher Team 1 · 2 1

"headers" are sent BEFORE the page content.
You must have, somewhere in the "BODY", a function that attempts to change the headers.
This can even be a blank line!

2007-10-09 07:51:34 · answer #2 · answered by just "JR" 7 · 1 1

fedest.com, questions and answers