codeigniter项目未在cpanel中运行

时间:2016-04-23 09:26:57

标签: php codeigniter cpanel

我已经在Codeigniter上完成了一个项目,并在我的域上上传了这个项目,比如域/项目,但它没有运行。它显示error page not found!我已经更改了我的配置文件并编辑了database.php,但仍然没有运行并抛出此错误可以帮助我吗?

这是配置设置

     $config['base_url'] = 'http://localhost/crm/';

并在database.php

       'hostname' => 'localhost',
       'username' => 'root',
       'password' => '',
       'database' => 'crm_valentine',
       'dbdriver' => 'mysqli',

我的项目文件中的htaccess是

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

我试过了两次,但它产生了这个错误 内部服务器错误

  The server encountered an internal error or misconfiguration and was      unable to complete your request.

Please contact the server administrator at webmaster@bdprogrammer.com to     inform them of the time this error occurred, and the actions you performed just   before this error.

More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while   trying    to use an ErrorDocument to handle the request.      

1 个答案:

答案 0 :(得分:0)

Viky指出你需要更改配置中的base_url 然后确保使用该路径。如果您上传了project文件夹,那么您需要将其domain/project设为domain/crm 确保服务器上存在数据库。

最重要的是,请检查错误日志,以获取有关错误的进一步提示。