Home >Backend Development >PHP Tutorial >thinkphp source code analysis Version 31 -1
PThinkphp source code analysis (version 3.1) -1
Index.php
define('IS_CGI',substr(PHP_SAPI, 0,3)== 'cgi' ? 1 : 0 );define('IS_WIN',strstr(PHP_OS, 'WIN') ? 1 : 0 );$_SERVER['PHP_SELF' ] Indicates the location address of the current php file relative to the website root directory, related to the document root.
url = “http://”$
_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] is available To represent the current url;defined path
defined('CORE_PATH') or define('CORE_PATH', THINK_PATH.'Lib/');
runtime file
Check the cache directory and delete the compilation cache in debug mode:
check_runtime()
Create the project directory structure
The above introduces thinkphp source code analysis Version 31 -1, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.