From 4b557fe0c790ce94ee4d531c3e403c704cfb476e Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Wed, 2 Jan 2019 10:24:48 +0800 Subject: [PATCH] =?UTF-8?q?tp=E8=87=AA=E5=B8=A6=E6=A0=B8=E5=BF=83=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- router.php | 22 ++++++++++++++++++++++ think | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 router.php create mode 100755 think diff --git a/router.php b/router.php new file mode 100644 index 00000000..b0a385ec --- /dev/null +++ b/router.php @@ -0,0 +1,22 @@ + +// +---------------------------------------------------------------------- +// $Id$ + +//router.php用于php自带webserver支持,可用于快速测试,这取决于你的入口文件和配置参数。 + +if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) { + return false; +} else { + if (!isset($_SERVER['PATH_INFO'])) { + $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI']; + } + require __DIR__ . "/index.php"; +} diff --git a/think b/think new file mode 100755 index 00000000..0e865d55 --- /dev/null +++ b/think @@ -0,0 +1,18 @@ +#!/usr/bin/env php + +// +---------------------------------------------------------------------- + +namespace think; + +define('APP_PATH', __DIR__ . '/application/'); + +// 加载框架引导文件 +require __DIR__.'/thinkphp/console.php'; \ No newline at end of file