liunx-centos5.6-apache-x86部署php-CodeIgniter_2.1.4提示无法连接数据库
AcceptPathInfo On
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^(.*).html $1 [L] L]
要目录下的.htaccess
config/database.php也是看了又看肯定是没错的了,oncache也关了。
文件名和class名也统统是小写的了,今天上去一看提示无法连接数据库
麻烦帮我看看,谢谢!
$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = '107.160.184.127';
$db['default']['username'] = 'root';
$db['default']['password'] = 'abc136268';
$db['default']['database'] = 'jyz';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class my_model extends CI_Model
{
public function __construct()
{
parent::__construct();
$this->load->database('default');
}
}
Hachii☆
11 years ago