One, change the application name
When we deploy the thinkphp code, we have to structure it like this.
We can set the app name in the index.php portal file
The code is as follows.
<?PHP// +----------------------------------------------------------------------// | thinkphp [WE CAN do IT JUST THINK]//+----------------------------------------------------------------------//| Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.//+-------------------------------------------------- --------------------// | Licensed (http://www.apache.org/licenses/LICENSE-2.0)//+------------------------------------------------------- ---------------// | author:liu21st <[email protected]>//+--------------------------------------------------------------------- -//Application Portal File//detection PHP environmentif(Version_compare(php_version, ' 5.3.0 ', ' < ') die(' Require PHP > 5.3.0! '));//Open Debug mode suggest the development phase to open the deployment phase comment or set to FalseDefine(' App_debug ',True);//Here you can set the default module and controller/*default load Module $_get[' m '] = ' module name ';*//*default Load controller $_get[' c '] = ' controller name ';*///defining the App catalogDefine(' App_path ', './website/');//Here you can change the app name//introduce thinkphp entry filerequire'./thinkphp/thinkphp.php ';//There 's no code behind the pro ^_^, it's so simple.
In addition, we can add these configurations in the app directory.
Take website here for the app name
/website/common/conf/config.php
Related configuration I put the code directly
The notes are all written clearly.
1<?PHP2 return Array(3 //' Config item ' = ' config value '4 //Disable module Access5 //' module_deny_list ' = = Array (' Common ', ' Runtime '),6 //Allow module access7 //' module_allow_list ' = = Array (' Index ', ' Admin '),8 //Set default load module9 //' default_module ' = ' Home ',Ten //Only one module allowed One //' multi_module ' = False, A //Modify the URL delimiter for PathInfo - //' url_pathinfo_depr ' = ' _ ', - //modifier key Name the /*' var_module ' = ' m ', - ' var_controller ' = ' C ', - ' var_action ' = ' a '*/ - + //MySQL Global definition -' Db_type ' = ' mysqli ', +' Db_host ' = ' 127.0.0.1 ', A' Db_user ' = ' root ', at' db_pwd ' = ' 123 ', -' Db_name ' = ' cameramysql ', -' Db_port ' = ' 3306 ', -' Db_prefix ' = ' cm_ ', -' Show_page_trace ' =true - in //PDO Configuration - /*' db_type ' = ' PDO ', to ' db_user ' = ' root ', + ' db_pwd ' = ' 123 ', - ' db_prefix ' = ' cm_ ', the ' db_dsn ' = ' Mysql:host=localhost;dbname=cameramysql;charset=utf8 ',*/ * $);
thinkphp Minor Tricks Change the application name