FAQ
當建立 model 後,無法 autoload 時…
<?php
class ModuleName_Model_ModelName { }
|
$model = new ModuleName_Model_ModelName();
|
application.ini
resources.modules[] = "default" resources.modules[] = "News"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultModule = "News"
|
如果有定義 module 的話,可以為個別的 module 做設定,比方說現在有個 blog
module :
blog.resources.db.adapter = "pdo_mysql" blog.resources.db.params.host = "localhost" blog.resources.db.params.username = "username" blog.resources.db.params.password = "password" blog.resources.db.params.dbname = "dbname"
|
References