知識庫: Linux 虛擬主機
Cannot modify header information - headers already sent by 的解決方法
發佈人 Chris Chen, lastmodifiedby Sherry Li 發表於 24 8月 2021 03:03 下午

這問題其實發生是發生在轉向時,緩衝區出了些問題。

只要調整 PHP 環境參數,把 output_buffering 的選項 on 即可。

 

虛擬主機有提供 Select PHP Version 作法:

=======================================

遠振的虛擬主機大部分都有安裝 Select PHP Version 功能,

點選 Select PHP Version 選項,選擇您需要的 PHP 版本,點選 Set as current

(預設應該都是 native,必須選擇沒有 naive 字樣的 php 版本才可以調整 PHP 設定)

上方的地方選擇 Options

output_buffering 更改為 4096,點選 save

Select PHP Version 教學:https://cpanel.net.tw/extension-selector.html

=======================================

(712 votes)
非常有幫助
沒有任何幫助

遠振資訊股份有限公司 • 統一編號:28132571
服務專線:4499-343 (手機撥打請加 02)• 地址:235601 新北市中和區中正路866之7號12樓
[ 雲端主機 ] • [ 虛擬主機 ] • [ 實體主機 ] • [ SSL 憑證 ] • [ 網域申請 ] • [ cPanel 教學 ] • [ WHM 教學 ]
本公司由 鴻安法律事務所秘書 擔任常年法律顧問 • Copyright 2013-2023 All Rights Reserved