好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

TP config.php改变之后 - Thinkphp

TP config.php改变之后

如果改变了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)  "dddd@ddd.com"  } } 

查看更多关于TP config.php改变之后 - Thinkphp的详细内容...

  阅读:75次