Always come back to update progress ...
Set the entry file in the project directory
index.php:
1<?PHP2 //Detecting PHP environments3 if(Version_compare(php_version, ' 5.3.0 ', ' < ') die(' Require PHP > 5.3.0! '));4 //Introducing the thinkphp entry file5 require('./thinkphp/thinkphp.php ');6 //Open Debug mode suggest the development phase to open the deployment phase comment or set to False7 Define(' App_debug ',True);//If you modify the source file after generating the corresponding file for the False,runtime folder, the system will still read the runtime file8 //define app name9 Define(' App_name ', ' Leo ');Ten //defining the App catalog One Define(' App_path ', './leo/');
It is important to note that the capitalization of the Code requires attention. There is no difference under Windows Server, there is a problem with the case of Linux servers. Therefore, the code is written both for readability and for running under different servers, strictly keeping the casing correct.
The following file structure is only the default, and the directory name and structure below the project can be redefined. In fact, the project directory does not need to be manually created by the developer, only need to define the project's portal file, the system will be executed at the first time to automatically generate the project must have all the directory structure (if the project directory has writable permissions, which needs to be noted under the Linux environment).
You can see that the new version of the directory structure is easier to deploy and configure, because only the runtime directory is required to have writable permissions, and under the Linux environment, you can deploy and configure directory permissions more quickly.
Folder
Thinkphp folder:
Public entry file for thinkphp.php framework
Common public functions that store the framework (some common files, system definitions, system functions, and custom configurations that contain the framework)
Conf the configuration file for the storage framework
Lang Storage Framework Language Pack
zh_cn.php Chinese Language Pack
Lib (library) storage System base Class Library Directory
Vendor third-party class library catalogs
Mode storage frame Pattern Extension Directory
TPL holds the template file for the current project
Application directory (project directory)
Index.php Project Entry file (you can use a different name or place it in another location)
Public functions for Common projects
Conf the project configuration directory, where all the configuration files are placed.
(Lang Project Language Pack Directory
Lib Project Class Library directory, usually including action and model subdirectories
TPL Project template catalog, Support Template theme) (optional)
Runtime files that store the runtime of the current project
Cache is typically a buffer for placing templates
Data is the directory where
Logs release log
Temp Drop Data cache
First knowledge of thinkphp