PHP头条
热点:

TPconfig.php改变之后


如果改变了conf/config.php文件中的配置信息,那么需要删掉runtime/~runtime.php,否则:会出现系统信息错误.

比如我在配置完数据库信息后:

  1. if (!defined('THINK_PATH')) exit(); 
  2. return array
  3. 'DB_TYPE'=>'mysql'// 使用的数据库是mysql 
  4. 'DB_HOST'=>'localhost'
  5. 'DB_NAME'=>'myapp',// 数据库名 
  6. 'DB_USER'=>'root'
  7. 'DB_PWD'=>'yzw',// 填写你连接数据库的密码 
  8. 'DB_PORT'=>'3306'
  9. 'DB_PREFIX'=>'think_'// 数据表表名的前缀 请参看http://thinkphp.cn/Article/10 
  10. ); 
  11. ?> 

信息一直刷不出来,直到我删除了~runtime.php之后就好了:

  1. public function index() { 
  2.     //$this->assign('str',"hello "); 
  3.      //$this->display(); 
  4.       $Form = D("Form"); 
  5.       $result  = $Form->findAll(); 
  6.       dump($result); 
  7.   } 

然后输出的信息为:

  1. 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) "dddd@ddd.com" } } 

www.phpzy.comtrue/phpkj/6189.htmlTechArticleTPconfig.php改变之后 如果改变了conf/config.php文件中的配置信息,那么需要删掉runtime/~runtime.php,否则:会出现系统信息错误. 比如我在配置完数据库信息后: if (!defined( THINK_PATH )) exit (); return...

相关文章

相关频道:

PHP之友评论

今天推荐