2016-12-01 69 views
0

我有一個網站「http://fantastictravels.co/」它工作正常,但突然昨天它停止工作,並給我錯誤,同時打開該網站。它基於php中的codeigniter框架。頁面不起作用,HTTP錯誤500

我的控制器代碼是:

defined('BASEPATH') OR exit('No direct script access allowed'); 
    class Travels extends CI_Controller { 

     function __construct(){ 
      parent :: __construct(); 
      $this->load->model('Travel'); 
      $this->load->helper('url'); 
     } 

我htaccess的代碼是:

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L] 
+0

自昨天以來發生了什麼變化?你在使用託管公司嗎?他們升級了什麼嗎?您是否查看了錯誤日誌以獲取更多信息? –

+0

[HTTP 500表示通用服務器端錯誤](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error)。任何時候你看到它的第一步應該是看你的日誌。他們應該揭示有用的細節。 – Chris

+0

不變沒有更新我沒有更新 –

回答

0

您可以通過查看日誌的Apache2調試代碼。假設您已安裝apache2,請在您的終端中運行此命令並嘗試訪問您的站點。

tail -f /etc/apache2/error.log 

當主要存在代碼問題時會出現HTTP 500錯誤。檢查這個鏈接。

https://www.lifewire.com/500-internal-server-error-explained-2622938