Summary of system constants in the Action Controller of thinkphp. I just started to learn the thinkphp framework. next I will summarize the system constants that can be directly used in thinkphp's Action controller, so that they can be used directly after being memorized. THINK_PATHTh just started to learn the thinkphp framework. next we will summarize the system constants that can be directly used in the thinkphp Action controller, so that they can be used directly after being memorized.
THINK_PATH // ThinkPHP system directory
APP_PATH // Current Project directory
APP_NAME // Current project name
MODULE_NAME // name of the current module
ACTION_NAME // Current operation name
TMPL_PATH // project template directory
LIB_PATH // Directory of the project class library
CACHE_PATH // project template cache Directory
CONFIG_PATH // project configuration file directory
LOG_PATH // project log file directory
LANG_PATH // project language file directory
TEMP_PATH // temporary project file directory
PLUGIN_PATH // Directory of the project plug-in file
VENDOR_PATH // third-party Class Library Directory
DATA_PATH // project data file directory
IS_APACHE // whether it belongs to Apache
IS_IIS // whether it belongs to IIS
IS_WIN // whether it belongs to the Windows environment
IS_LINUX // whether it belongs to the Linux environment
IS_FREEBSD // whether it belongs to the FreeBsd environment
NOW_TIME // Current timestamp
MEMORY_LIMIT_ON // whether the memory usage limit exists
OUTPUT_GZIP_ON // whether to enable output compression
MAGIC_QUOTES_GPC // MAGIC_QUOTES_GPC
THINK_VERSION // ThinkPHP version
LANG_SET // browser language
TEMPLATE_NAME // name of the current template
TEMPLATE_PATH // Current template path
// Website root directory address
/Index. php // address of the current project (entry file)
/Index. php/Article // address of the current module
/Index. php/Article/detail // Current operation address
/Php-weizijiaocheng-295663.html // Current URL
/Public // Public website directory
TMPL_FILE_NAME // Default Template name (including path) for the current operation)
WEB_PUBLIC_URL // public website directory
APP_PUBLIC_URL // System constant used in the project public Template directory Template
Articles you may be interested in
- Summary of common system variables in Thinkphp templates
- PHP uses Curl Functions to Capture webpages and download files with multiple threads
- How does thinkphp remove index. php from the url?
- Thinkphp prints the last SQL statement
- The last record of the volist loop in the thinkphp Template
- Summary of query techniques in ThinkPHP
- Summary of String Functions in PHP
- Php converts multiple consecutive spaces in a string into one.
In the thinkphp framework, we will summarize the system constants that can be directly used in the thinkphp Action controller, so that they can be used directly after being memorized. THINK_PATH // Th...