The CakePHP kernel configuration variable configuration class is usually used to set the core configuration variables of CakePHP. these variables are in the appconfigcore. php file. The following describes the variables and their impact on CakePHP. Variable name description debug set CakePHP debug output mode 0 no output result 1 error message and warning 2 error message, warning and database query language CakePHP kernel configuration variable
The configuration class is usually used to set the core configuration variables of CakePHP, which are in the app/config/core. php file. The following describes the variables and their impact on CakePHP.
Variable name description
Debug |
Set the output mode for CakePHP debugging
0 = no output results 1 = Display error messages and warnings 2 = Display error messages, warnings, and database query statements 3 = displays error messages, warnings, and database query statements to complete the controller dump?
|
App. baseUrl |
Do not comment out this definition if youNot intendedUse Apache mod_rewrite. do not forget to delete the. htaccess file. |
Routing. admin |
Do not comment out this variable. if you want to use the CakePHP route (admin route) and the variable value is the same as the route name, we will introduce more. |
Cache. disable |
If it is set to true, the cache of the entire website will be disabled. |
Cache. check |
If this parameter is set to true, view cache is enabled. Although the controller cache needs to be enabled separately, this variable can monitor these settings. |
Session. save |
What is the session storage mechanism of CakePHP?
Php = use the default PHP session storage Cake = Save session data to the/app/tmp Directory Database = Save the session to the database table. However, you must use the/app/config/SQL/sessions. SQL database query file to set the table. |
Session. table |
Name of the table storing the session, excluding the prefix |
Session. database |
Name of the database storing the session |
Session. cookie |
Name of the cookie that tracks the session |
Session. timeout |
Session Timeout time, in seconds. the actual value is based on Security. level. |
Session. start |
If this parameter is set to true, sessions is enabled automatically. |
Session. checkAgent |
If this parameter is set to false, the session does not check whether the user of each request has not changed. |
Security. level |
CakePHP security level. The value of the security level determines the value of Session. timeout?
Valid values: 'High' = x 10 'Medium '= x 100 'Low' = x 300
If it is set to 'high' or 'Medium ', the session. referer_check?
If 'security. level' is set to 'high', the session ID of CakePHP is regenerated in each request. |
Security. salt |
A random string is used in the security hash method. |
Acl. classname, Acl. database |
Constant, used in the CakePHP access control list function. For more information, see the access control list section. |
Note:Cache configuration is also available in the core. php file. we will explain it later.
The configuration class can instantly modify the kernel configuration, which is quite convenient, especially when debugging a small segment of logic.