好得很程序员自学网

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

thinkphp 项目入口文件及项目前台和后台公用配置

thinkphp 项目入口文件及项目前台和后台公用配置文件

公用配置文件:

<?php  return   array (    'DB_TYPE'                =>  'mysql' ,      // 数据库类型     'DB_HOST'                =>  'localhost' ,  // 服务器地址     'DB_NAME'                =>  'aaasearch' ,           // 数据库名     'DB_USER'                =>  'root' ,       // 用户名     'DB_PWD'                 =>  'root' ,           // 密码     'DB_PORT'                =>  '3306' ,         // 端口     'DB_PREFIX'              =>  '' ,     // 数据库表前缀     'SESSION_AUTO_START'     =>  'true' ,    'URL_MODEL'              => 0,  );  ?> 

前台的配置文件:

<?php  $config_arr1  =  include_once  WEB_ROOT .  'config.php' ;  $config_arr2  =  array (      );  return   array_merge ( $config_arr1 ,  $config_arr2 );  ?> 

后台的配置文件:

<?php  $config_arr1  =  include_once  WEB_ROOT .  'config.php' ;  $config_arr2  =  array (      );  return   array_merge ( $config_arr1 ,  $config_arr2 );  ?> 

前台的入口文件:

<?php  define( "APP_NAME" , "index" );  define( "APP_PATH" , "./index/" );  define( '__PUBLIC__' , '__ROOT__/public/' );  define( "WEB_ROOT" , dirname( __FILE__ ) .  "/" );  require ( "ThinkPHP/ThinkPHP.php" );  ?> 

查看更多关于thinkphp 项目入口文件及项目前台和后台公用配置的详细内容...

  阅读:78次