可能重複:
Cannot modify header information - headers already sent, Why its happening
Headers already sent by PHP警告:WordPress的儀表板在session_start()[function.session開始]錯誤
我得到了我的WordPress的儀表板下面的錯誤信息。
警告:在session_start()[function.session啓動]:無法發送會話緩存限制器 - 已經發送了頭(輸出開始/homez.152/mamouman/www/wp-content/themes/arthur/functions .PHP:47)在上線/homez.152/mamouman/www/wp-content/themes/modularity/functions/admin-js.php 2`
這裏是我剛剛添加的內容我functions.php文件
add_filter('wp_nav_menu_items','add_search_box', 10, 2);
function add_search_box($items, $args) {
ob_start();
get_search_form();
$searchform = ob_get_contents();
ob_end_clean();
$items .= '<li>' . $searchform . '</li>';
return $items;
}
這裏是my admin-js.php。
您無法鏈接到直接託管的PHP文件,我們無法看到它的源代碼。 – kennypu
感謝kennypu,好吧,我已經將URL更改爲臨時上傳。 –