[Li Jingshan php] every day tp5-20161211| App.php-1

Source: Internet
Author: User

 +----------------------------------------------------------------------// | thinkphp [  we can do it just think ]// +---------------------------------------- ------------------------------// | copyright  (c)  2006~2016 http://thinkphp.cn  all rights reserved.// +----------------------------------------------------------------------/ / | licensed  ( http://www.apache.org/licenses/LICENSE-2.0 )// +----------------- -----------------------------------------------------// | author: liu21st <[email  protected]>// +----------------------------------------------------------------------namespace  think;//  in the same big package   under use think\config;//  Use the   configuration class use think\env;//  use the Environment class  think\Exception;//  using Exception Pack use think\exception\httpexception;//  to use Exception Pack  http package use  Think\exception\httpresponseexception;//  using exception packs  http response  packages use think\hook;//  using   hooks   class use  think\Lang;//  use   language   class use think\loader;//  use   load   class use think\log;//   Using   Logging   class use think\request;//  using   request   class use think\response;//    return   class use think\route;//  using   routing   Class//  This class should be considered   The Emperor class   can schedule basically   all the resources/ ** * app  Application Management  *  @author   liu21st <[email protected]> * /class app{    /**     *  @var  bool  whether initialized      */    protected static  $init  = false;//   initialization   Flag bits     /**     *  @var  string  Current module path      */    public static  $modulePath;//  Initialization   Current   modules   paths     /**     *  @var  bool  Application debug Mode       */    public static  $debug  = true;//  application debugging   mode      /**     *  @var  string  Application class library namespaces       */    public static  $namespace  =  ' apps ';//  applications   class libraries   Namespaces     /**     *  @var  bool  Application class library suffixes       */    public static  $suffix  = false;//  Applications   Libraries   suffixes     /**     *  @var  bool  apply route detection      */    protected static  $routeCheck;//  Applications   Routing   detection     /**     *  @var  bool  Strict route detection      */    protected static  $routeMust; //  Strict   route detection      protected static  $dispatch;//  Routing scheduling     protected static  $file  = []; //  file Load     /**     *  Execute application       *  @access  public     *  @param  request   $request  request objects      *  @return  Response      *  @throws  Exception     */    public  Static function run (request  $request  = null)     {//  thinkphp after   automatic loading, error takeover, configuration file presets, and finally began to execute.         //  First step: Get request Parameters          is_null ($request)  &&  $request  = request::instance ();    &nbSp;    // self:: $instance  = new static ($options);  executed   this  instance        //  default   does not pass in any numeric,is_null  so execute   Back   $request  = request::instance ();        //  this notation   really   Very classic, I like you, Lao Liu, haha         //  finally acquired   a  request   Objects          $config  = self::initcommon ();//  loading   Initialization   Configuration   file   options


This article is from the "Focus on PHP Group number: 414194301" blog, please be sure to keep this source http://jingshanls.blog.51cto.com/3357095/1859690

[Li Jingshan php] every day tp5-20161211| App.php-1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.