這是我收到的錯誤消息。我建立我自己的主題和它拉在一堆文件與functions.php
在wordpress中收到錯誤消息「headers already sent」
Warning: Cannot modify header information - headers already sent by (output started at /home3/keganqui/public_html/dev/wp-content/themes/optimus/functions.php:5) in /home3/keganqui/public_html/dev/wp-includes/pluggable.php on line 866
新的functions.php文件,但出現同樣的錯誤消息:
<?php require(TEMPLATEPATH . '/inc/misc.php'); ?>
<?php require(TEMPLATEPATH . '/inc/widgets.php'); ?>
<?php require(TEMPLATEPATH . '/inc/homepage.php'); ?>
<?php
/* Include back-end */
if(is_admin()){ include TEMPLATEPATH.'/panel/panel.php'; }
/* Include front-end */
if(!is_admin()){ include TEMPLATEPATH.'/panel/panel-front.php'; }
?>
添加functions.php的前5行。 – fuxia 2012-02-16 03:45:20
我不確定php是否關心第1-3行關閉php'?>'標籤後面的'\ n'換行符。這可能只是我,但我會刪除那些關閉並打開''標籤,並且只使用一個開始'<?php'和一個結尾'?>'標記。 – jeremysawesome 2012-02-16 04:06:09
我同意傑里米 - 你應該刪除所有這些不必要的打開和關閉php標記。我更新了我的答案,以顯示他在說什麼...... – 2012-02-16 04:08:36