Thinkphp Source Code parsing (Version 3.1)-1
index.php
- Defining Path Constants
- Add-on Runtime directory
runtime.php
- Check the PHP version
if(version_compare(PHP_VERSION,'5.2.0','<')) die('require PHP > 5.2.0 !');
System Information
define('IS_CGI',substr(PHP_SAPI, 0,3)=='cgi' ? 1 : 0 );
define('IS_WIN',strstr(PHP_OS, 'WIN') ? 1 : 0 );
$_server[' Php_self ') represents the location address of the current PHP file relative to the root of the Web site, and is related to document root.
$url = "http://"$_server[' http_host '].$_server[' php_self ') can be used to represent the current URL;
Define Path
defined('CORE_PATH') or define('CORE_PATH', THINK_PATH.'Lib/');
Run-Time Files
load_runtime_file()
Load common function library, core control class, exception handling class, Behavior extension class, here with array traversal load, can try.
Check cache directory, debug mode to delete the compiled cache:
if(is_file(RUNTIME_FILE)) unlink(RUNTIME_FILE);
check_runtime()
build_runtime_cache()
Create a project directory structure
Executive Portal
Think::Start();
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the thinkphp source code parsing Version 31-1, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.