看板 PHP 關於我們 聯絡資訊
出現了以下的錯誤 Warning: Cannot modify header information - headers already sent by (output started at .........) php為: <? $db = mysql_connect('127.0.0.1:3306', 'root', '1234'); mysql_select_db('vote'); ?> <? $count_query = mysql_query("update count set get_vote=get_vote+1 where name = '$_POST[radio]'"); header("Refresh:3;URL=test.php"); ?> 只是想讓php對資料庫+1後就回主頁,但卻不行,請問這樣的錯誤該如何解決呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.170.39.110 ※ 編輯: martone 來自: 118.170.39.110 (03/07 18:48)
chweng:你好像把錯誤訊息的重點切掉了 03/07 19:37
chweng:他不是有告訴你header是從哪邊開始送出的嗎 03/07 19:38
ybite:把中間的?>和<?拿掉 03/07 19:38
ybite:那個地方應該會生出header 03/07 19:38
ileadu:FAQ (音好像髒話啊) 03/07 19:38
dspswen:bom ? utf-8 ? 03/07 20:36
edl2000:應該是 bom 的問題吧, 昨天才遇到 03/07 21:51
arianda:mysql_select_db('vote'); ?> 和下面的<?有空白, 3f正解 03/07 21:56
martone:感謝各位^^" 03/07 23:43