There are two ways to Think_php's entry mode
1, a portal file corresponding to a project application
2, one entry file for all project applications
By default, the portal file only needs to be require thinkphp folder. For example, the thinkphp file is stored in the think_php folder, so you can refer
Require_once ("/think_php/thinkphp.php");
If you include the project name and turn on debug mode, you can write
Define ("Think_path", "./thinkphp/");d efine ("App_path", "./app/"); Project folder define ("App_name", "index");d efine (' App_debug ', TRUE); Turn on Debug mode require_once (Think_path. " Thinkphp.php ");
This is the app folder and related profiles are automatically generated after accessing the index.php file
If you use the grouping mode, that is, multiple projects corresponding to a portal file, you need to modify the configuration file, if the project folder is an app, then modify app/conf/config.php as follows code (foreground code is home, the acquired code is admin)
Return Array (' app_group_list ' = ' admin,home ', ' default_group ' = ' Home ',);
Then create the admin and home folder under the App folder and create an empty config.php folder to two project folders, the entry file for the next two items is index.php, and the configuration files are in their own folder.
After you create the configuration folder, you also create the Controller folder, under the App/lib/action folder, create the admin and home folder and copy the IndexAction.class.php under action to the home folder. Configuration is complete.
think_php Portal File Configuration