-1
出於某種原因,我不能再訪問我的HostPapa的cPanel,它說:無法訪問的cPanel,收到「HTTP錯誤500」
The www.hostpapa.ca page isn’t working
www.hostpapa.ca is currently unable to handle this request.
HTTP ERROR 500
我檢查了我的錯誤日誌,我看到重複同樣的錯誤不同的日期/時間:
[07-Jun-2016 14:30:26 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
[07-Jun-2016 19:26:50 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
[08-Jun-2016 08:45:14 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
[08-Jun-2016 20:35:00 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
[08-Jun-2016 23:14:13 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
我檢查了文件和行1160是:
if(isset($r[2]) && @$r[2] == 'img' && preg_match('/MSIE [5-7]/',$_SERVER['HTTP_USER_AGENT']) == 0) {
它看起來像廢話給我所以我不知道該怎麼做。昨天我的合作伙伴讓我成爲該網站的「超級管理員」 - 不確定它是否與此有關?或爲什麼它會是偶數。
如果任何人都可以直接指向我,我會非常感激。
謝謝
看看這裏:http://stackoverflow.com/questions/14130830/php-undefined-index-http-user-agent –
你使用什麼瀏覽器? – aynber
您可以在'preg_match'之前添加條件'&& isset($ _ SERVER ['HTTP_USER_AGENT'])''。 –