随笔分类 -  thinkphp

摘要:前面讲了那么多 实际都只是在分析在分析入口文件index.php代码的第一句 $http = (new App())->http; 甚至连第一句都没完 只是分析了第一句的前半部分 下面我们看下第一句的后半部分 也就是http [tp6\vendor\topthink\framework\src\th 阅读全文

posted @ 2021-03-18 20:57 转瞬千年 阅读(642) 评论(0) 推荐(0)

摘要:上一篇关于APP类的构造函数 最后还有三句话 1 static::setInstance($this); 2 $this->instance('app', $this); 3 $this->instance('think\Container', $this); 1 /** 2 * 绑定一个类实例到容 阅读全文

posted @ 2021-03-17 19:46 转瞬千年 阅读(1250) 评论(0) 推荐(0)

摘要:上篇说到index.php里面的$http = (new App())->http 最终就是调了APP类同目录下的 think\Http [tp6\vendor\topthink\framework\src\think\Http.php] 调用之前 使用了系统的一个叫APP [tp6\vendor\ 阅读全文

posted @ 2021-03-08 21:04 转瞬千年 阅读(1374) 评论(0) 推荐(0)

摘要:1 <?php 2 namespace think; 3 4 require __DIR__ . '/../vendor/autoload.php'; 5 6 // 执行HTTP应用并响应 7 $http = (new App())->http; 8 9 $response = $http->run 阅读全文

posted @ 2021-03-08 20:11 转瞬千年 阅读(1083) 评论(0) 推荐(0)

导航