コードイグナイターバージョン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');
}
}
コントローラの&code.phpコードを表示します。 –
@RejoanulAlamコントローラーとDB文字列でアンパックされています。 –
'' hostname '=>' myipagehost '、 '' hostname' => 'localhost'、 ' –