我有一个问题,我的lampp。我在php.ini中激活了display_errors = 1;并插入函数来显示我的错误在PHP文件。PHP如何显示警告:警告:session_start():无法发送会话cookie - 头已发送
我的脚本
error_reporting(E_ALL);
ini_set('display_errors', 1);
echo "Hello World!";
header("Content-Type: text/html; charset=windows-1251");
我LAMPP告诉我没有错误。
托管告诉我一个错误,
Warning: Cannot modify header information - headers already sent by
我怎样才能激活它在我的LAMPP?
你不应该附和上述标题。只是改变顺序,它应该没问题 – Amit
OP想知道如何显示错误,而不是如何解决它。请参阅我的回答http://stackoverflow.com/questions/43361939/php-how-to-display-warning-warning-session-start-cannot-send-session-cookie/43362060#43362060 – shazyriver