如果改變了conf/config.php文件中的配置信息,那么需要刪掉runtime/~runtime.php,否則:會出現系統信息錯誤.
比如我在配置完數據庫信息后:
- <?php
- if (!defined('THINK_PATH')) exit();
- return array(
- 'DB_TYPE'=>'mysql', // 使用的數據庫是mysql
- 'DB_HOST'=>'localhost',
- 'DB_NAME'=>'myapp',// 數據庫名
- 'DB_USER'=>'root',
- 'DB_PWD'=>'yzw',// 填寫你連接數據庫的密碼
- 'DB_PORT'=>'3306',
- 'DB_PREFIX'=>'think_', // 數據表表名的前綴 請參看http://thinkphp.cn/Article/10
- );
- ?>
信息一直刷不出來,直到我刪除了~runtime.php之后就好了:
- public function index() {
- //$this->assign('str',"hello ");
- //$this->display();
- $Form = D("Form");
- $result = $Form->findAll();
- dump($result);
- }
然后輸出的信息為:
- array(1) { [0] => array(7) { ["id"] => string(1) "1" ["title"] => string(18) "這是測試數據" ["content"] => string(4) "dfdf" ["create_time"] => string(10) "1212724876" ["update_time"] => string(1) "0" ["status"] => string(1) "1" ["email"] => string(12) "[email protected]" } }
新聞熱點
疑難解答
圖片精選