名前空間 HomeController;
ThinkController を使用します。
class IndexController extends Controller {
public function index(){
$Data = M('oa_news');
$this-> データ = $Data->select();
$this-> 画面();
}
}
?>
return array(
'DB_TYPE' => 'MySql',
'DB_HOST' => 'localhost',
'DB_NAME ' => 'Wechar',
'DB_USER' => 'root',
'DB_PORT' => 3306,
);
:(
無法追加データ库驱动: ThinkDbDriver
错误位置
FILE: E:ThinkPHPThinkPHPLibraryThinkDb.class.php LINE: 42
TRACE
#0 E:ThinkPHPThinkPHPLibraryThinkDb.class.php(42): E('xE6x97xA0xE6xB3x95xE5x8AxA0xE8) xBDxBDxE6x95xB0...')
#1 E:ThinkPHPThinkPHPLibraryThinkModel.class.php(1423): ThinkDb::getInstance('')
#2 E:ThinkPHPThinkPHPLibraryThinkModel.class.php(97): ThinkModel->db(0, '', true)
#3 E:ThinkPHPThinkPHPCommonfunctions.php(621): ThinkModel->__construct('oa_news', '', '')
#4 C:xampphtdocsappApplicationHomeControllerIndexController.class.php(6): M( 'oa_news')
#5 [内部関数]: HomeControllerIndexController->index()
#6 E:ThinkPHPThinkPHPLibraryThinkApp.class.php(164): ReflectionMethod->invoke(Object(HomeControllerIndexController))
#7 E:ThinkPHPThinkPHPLibraryThinkApp.class.php(205): ThinkApp::exec()
#8 E:ThinkPHPThinkPHPLibraryThinkThink.class.php(120): ThinkApp::run()
#9 E:ThinkPHPThinkPHPThinkPHP .php(97): ThinkThink::start()
#10 C:xampphtdocsappindex.php(24): require('E:\ThinkPHP\Thi...')
#11 {main}
回复讨论(解决方案)
你的 MySQL 不有启动,または不有加播 mysql 扩展
你可试试127.0.0.1 有
问题すでに解決済み 谢谢