,網站是gb2312編碼的windosw改成centos後我的網站成白板了。這是什麼情況呢?在windows都很正常,換成centos就成白板了,也不報錯。這是什麼情況呢?下面是我網站的
回複討論(解決方案)
這是為什麼呢?怎麼沒有回答呢、??
首先你需要看下你的PHP版本,如果超出你寫的代碼支援的範圍或者版本不夠就會出現這種問題。
php.ini
display_errors= on
開啟錯誤提示功能就知道是什麼原因了。
display_errors= on已經設定了啊
$url = 'http://job.ncsq.net/index2.php';print_r(get_headers($url));
Array
(
[0] => HTTP/1.1 200 OK
[1] => Server: nginx/1.0.15
[2] => Date: Mon, 15 Dec 2014 08:43:11 GMT
[3] => Content-Type: text/html;charset=gb2312
[4] => Connection: close
[5] => X-Powered-By: PHP/5.2.17p1
[6] => Set-Cookie: PHPSESSID=af64987394c7dbfabbe917ee776cad46; path=/ sessionid 已發出,可認為程式並無嚴重的錯誤
[7] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
[8] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
[9] => Pragma: no-cache
[10] => Content-Length: 0 文檔流長度為 0,可能是因為某個條件不滿足,程式直接退出了
)
看看是不是你某個編譯目錄沒有執行許可權
$url = 'http://job.ncsq.net/index2.php';print_r(get_headers($url));
Array
(
[0] => HTTP/1.1 200 OK
[1] => Server: nginx/1.0.15
[2] => Date: Mon, 15 Dec 2014 08:43:11 GMT
[3] => Content-Type: text/html;charset=gb2312
[4] => Connection: close
[5] => X-Powered-By: PHP/5.2.17p1
[6] => Set-Cookie: PHPSESSID=af64987394c7dbfabbe917ee776cad46; path=/ sessionid 已發出,可認為程式並無嚴重的錯誤
[7] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
[8] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
[9] => Pragma: no-cache
[10] => Content-Length: 0 文檔流長度為 0,可能是因為某個條件不滿足,程式直接退出了
)
我是菜鳥啦 不懂的 是把這些代碼複製進去嗎?
出現問題就是白板
看看是不是你某個編譯目錄沒有執行許可權
我是php免費的開來源程式 怎麼知道他需要的許可權呢?我覺得也是許可權問題
看看你的程式檔案夾是不是有rwx許可權。
看看你的程式檔案夾是不是有rwx許可權。
有啊,是777許可權呢
我是用的這個命令 chmod 777 -R 目錄