將PHP部署到服務器時出現這么一個錯誤:
Cannot modify header information - headers already sent by
Warning: Cannot modify header information - headers already sent by (output started at E:PHPAppServwwwPHPWebUser_Login.php:3) in E:PHPAppServwwwPHPWebUser_Login.php on line 28
便到網上到處找解決方案,有的說要將php放在HTML,有的說要加ob_start();:打開輸出緩沖區(qū),都有道理,對于我這個情況,還是不行.
后面才找到根本原因,確實要打開緩沖區(qū),是要到php.ini里面進行設置.
php.ini 然后把 output_buffering 設為 on 。
希望本文對廣大南昌網站建設公司技術人員有所幫助.