0
已將以前在代碼點火器3.0版上運行的應用程序更新爲3.0.6。在我的本地服務器上工作正常,但是當我上傳到ipage時,我得到數據庫錯誤。遺憾的是,在堆棧溢出中通過手動嘗試的解決方案遺憾地不適合我。數據庫錯誤CodeIgnitor 3.0.6
DB連接
'dsn' => '',
'hostname' => 'myipagehost',
'username' => 'myusername',
'password' => 'mypass',
'database' => 'mydatabase',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
控制器着陸
class Landing extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function index()
{
// $this->load->view('template/frontheader');
$this->load->view('landing/index');
// $this->load->view('template/frontfooter');
}
function internships()
{
$this->load->view('landing/internship');
}
function cities()
{
$this->load->view('landing/cities');
}
function categories()
{
$this->load->view('landing/categories');
}
function policy()
{
$this->load->view('landing/policy');
}
function support()
{
$this->load->view('template/frontheader');
$this->load->view('landing/support');
$this->load->view('template/frontfooter');
}
function termsandcondition()
{
$this->load->view('landing/termaandcondition');
}
function aboutus()
{
$this->load->view('template/frontheader');
$this->load->view('landing/aboutus');
$this->load->view('template/frontfooter');
}
function partner()
{
$this->load->view('template/frontheader');
$this->load->view('landing/partners');
$this->load->view('template/frontfooter');
}
function faq()
{
$this->load->view('landing/faq');
}
function contact()
{
$this->load->view('landing/contactus');
}
}
顯示您的代碼controller&database.php –
@RejoanulAlam未使用控制器和db字符串填充。 –
''hostname'=>'myipagehost','它應該'hostname'=>'localhost',' –