BVB Source Codes

The latest thinkphp v5.2 work order system Show ThinkPHP.php Source code

Return Download The latest thinkphp v5.2 work order system: download ThinkPHP.php Source code - Download The latest thinkphp v5.2 work order system Source code - Type:.php
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11.  
  12. //----------------------------------
  13. // ThinkPHP公共入口文件
  14. //----------------------------------
  15.  
  16. // 记录开始运行时间
  17. $GLOBALS['_beginTime'] = microtime(TRUE);
  18. // 记录内存初始使用
  19. define('MEMORY_LIMIT_ON',function_exists('memory_get_usage'));
  20. if(MEMORY_LIMIT_ON) $GLOBALS['_startUseMems'] = memory_get_usage();
  21.  
  22. // 版本信息
  23. const THINK_VERSION     =   '3.2.3';
  24.  
  25. // URL 模式定义
  26. const URL_COMMON        =   0;  //普通模式
  27. const URL_PATHINFO      =   1;  //PATHINFO模式
  28. const URL_REWRITE       =   2;  //REWRITE模式
  29. const URL_COMPAT        =   3;  // 兼容模式
  30.  
  31. // 类文件后缀
  32. const EXT               =   '.class.php';
  33.  
  34. // 系统常量定义
  35. defined('THINK_PATH')   or define('THINK_PATH',     __DIR__.'/');
  36. defined('APP_PATH')     or define('APP_PATH',       dirname($_SERVER['SCRIPT_FILENAME']).'/');
  37. defined('APP_STATUS')   or define('APP_STATUS',     ''); // 应用状态 加载对应的配置文件
  38. defined('APP_DEBUG')    or define('APP_DEBUG',      false); // 是否调试模式
  39.  
  40. if(function_exists('saeAutoLoader')){// 自动识别SAE环境
  41.     defined('APP_MODE')     or define('APP_MODE',      'sae');
  42.     defined('STORAGE_TYPE') or define('STORAGE_TYPE',  'Sae');
  43. }else{
  44.     defined('APP_MODE')     or define('APP_MODE',       'common'); // 应用模式 默认为普通模式    
  45.     defined('STORAGE_TYPE') or define('STORAGE_TYPE',   'File'); // 存储类型 默认为File    
  46. }
  47.  
  48. defined('RUNTIME_PATH') or define('RUNTIME_PATH',   APP_PATH.'Runtime/');   // 系统运行时目录
  49. defined('LIB_PATH')     or define('LIB_PATH',       realpath(THINK_PATH.'Library').'/'); // 系统核心类库目录
  50. defined('CORE_PATH')    or define('CORE_PATH',      LIB_PATH.'Think/'); // Think类库目录
  51. defined('BEHAVIOR_PATH')or define('BEHAVIOR_PATH',  LIB_PATH.'Behavior/'); // 行为类库目录
  52. defined('MODE_PATH')    or define('MODE_PATH',      THINK_PATH.'Mode/'); // 系统应用模式目录
  53. defined('VENDOR_PATH')  or define('VENDOR_PATH',    LIB_PATH.'Vendor/'); // 第三方类库目录
  54. defined('COMMON_PATH')  or define('COMMON_PATH',    APP_PATH.'Common/'); // 应用公共目录
  55. defined('CONF_PATH')    or define('CONF_PATH',      COMMON_PATH.'Conf/'); // 应用配置目录
  56. defined('LANG_PATH')    or define('LANG_PATH',      COMMON_PATH.'Lang/'); // 应用语言目录
  57. defined('HTML_PATH')    or define('HTML_PATH',      APP_PATH.'Html/'); // 应用静态目录
  58. defined('LOG_PATH')     or define('LOG_PATH',       RUNTIME_PATH.'Logs/'); // 应用日志目录
  59. defined('TEMP_PATH')    or define('TEMP_PATH',      RUNTIME_PATH.'Temp/'); // 应用缓存目录
  60. defined('DATA_PATH')    or define('DATA_PATH',      RUNTIME_PATH.'Data/'); // 应用数据目录
  61. defined('CACHE_PATH')   or define('CACHE_PATH',     RUNTIME_PATH.'Cache/'); // 应用模板缓存目录
  62. defined('CONF_EXT')     or define('CONF_EXT',       '.php'); // 配置文件后缀
  63. defined('CONF_PARSE')   or define('CONF_PARSE',     '');    // 配置文件解析方法
  64. defined('ADDON_PATH')   or define('ADDON_PATH',     APP_PATH.'Addon');
  65.  
  66. // 系统信息
  67. if(version_compare(PHP_VERSION,'5.4.0','<')) {
  68.     ini_set('magic_quotes_runtime',0);
  69.     define('MAGIC_QUOTES_GPC',get_magic_quotes_gpc()? true : false);
  70. }else{
  71.     define('MAGIC_QUOTES_GPC',false);
  72. }
  73. define('IS_CGI',(0 === strpos(PHP_SAPI,'cgi') || false !== strpos(PHP_SAPI,'fcgi')) ? 1 : 0 );
  74. define('IS_WIN',strstr(PHP_OS, 'WIN') ? 1 : 0 );
  75. define('IS_CLI',PHP_SAPI=='cli'? 1   :   0);
  76.  
  77. if(!IS_CLI) {
  78.     // 当前文件名
  79.     if(!defined('_PHP_FILE_')) {
  80.         if(IS_CGI) {
  81.             //CGI/FASTCGI模式下
  82.             $_temp  = explode('.php',$_SERVER['PHP_SELF']);
  83.             define('_PHP_FILE_',    rtrim(str_replace($_SERVER['HTTP_HOST'],'',$_temp[0].'.php'),'/'));
  84.         }else {
  85.             define('_PHP_FILE_',    rtrim($_SERVER['SCRIPT_NAME'],'/'));
  86.         }
  87.     }
  88.     if(!defined('')) {
  89.         $_root  =   rtrim(dirname(_PHP_FILE_),'/');
  90.         define('',  (($_root=='/' || $_root=='\\')?'':$_root));
  91.     }
  92. }
  93.  
  94. // 加载核心Think类
  95. require CORE_PATH.'Think'.EXT;
  96. // 应用初始化
  97. Think\Think::start();
downloadThinkPHP.php Source code - Download The latest thinkphp v5.2 work order system Source code
Related Source Codes/Software:
V3.3.6 Workerman high-performance PHP Socket (framework) - High performance PHP Socket framework Workerman re... 2017-05-03
The phosphor meeting room reservation system MRBS (loop reservation v16.0) - The phosphor meeting room reservation system MRBS ... 2017-05-03
IDC v5.2.3 agent center - IDC Centre IDC for exploitation is a PHP+MySQL age... 2017-05-03
Zen master v9.0.1 project management software - Zen is the first domestic open source project mana... 2017-05-03
Ray speed v7.03 employee files management system - Employee files project is various, and some conten... 2017-05-03
HITCMS Haitian responsive electronic mechanical v3.0 foreign trade website source code - HITCMS Haitian response electronic machinery trade... 2017-05-03
Ray v7.02 speed survey system - Lightning speed survey system is a. NET+MSSQL deve... 2017-05-03
Cool HITCMS reactive black v3.0 enterprise website source code - HITCMS-Haitian response black enterprises website ... 2017-05-03
WebOA v17.2 network office automation system - WebOA network using b/s structure development of o... 2017-05-03
Pure imitation of han site source code, one a 】 【 c9cms kernel v1.0 - Generic http://www.wufazhuce.com/Han one · Config... 2017-05-04
zone.js - Implements Zones for JavaScript ... 2017-05-11
dragonfly - A Ruby gem for on-the-fly processing - suitable fo... 2017-05-11
oh-my-fish - The Fishshell Framework. 2017-05-11
canvas-lms - The open LMS by Instructure, Inc. 2017-05-11
ledger - Double-entry accounting system with a command-line... 2017-05-11
Python - My Python Examples http://w... 2017-05-11
blade - 2017-05-11
LaZagne - Credentials recovery project 2017-05-10
Pull-to-Refresh.Rentals-iOS - This project aims to provide a simple and customiz... 2017-05-10
spoon - Distributing instrumentation tests to all your And... 2017-05-10

 Back to top