今天一位客戶問ytkah網站后台出現了Warning: file_get_contents(): open_basedir restriction in effect. File(/proc/uptime) is not within the allowed path(s):提示錯誤,如下圖所示,這個是因為php的open_basedir設置引起的。客戶的運行環境是寶塔面板,那設置就很方便了
進入站點設置,將防跨站攻擊(open_basedir)前的勾去掉,刷新一下后台,提示消失了
但是為了安全起見,在不影響網站運行的情況下,建議還是把防跨站攻擊開啟。