From 8746d68493aedf37316f67e0333e29139838ad3c Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 12 May 2020 15:32:50 +0800 Subject: [PATCH] =?UTF-8?q?cp=E4=B8=8B=E6=B8=B8=E6=8E=A5=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PartnerController.class.php | 26 ++++++++++++ api.php | 42 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 Application/Api/Controller/PartnerController.class.php create mode 100644 api.php diff --git a/Application/Api/Controller/PartnerController.class.php b/Application/Api/Controller/PartnerController.class.php new file mode 100644 index 000000000..1fd2c63d7 --- /dev/null +++ b/Application/Api/Controller/PartnerController.class.php @@ -0,0 +1,26 @@ +field("id,partner name")->select(); + + header('Content-Type:application/json; charset=utf-8'); + exit(json_encode($data)); + + } + +} + diff --git a/api.php b/api.php new file mode 100644 index 000000000..a3de6e2b3 --- /dev/null +++ b/api.php @@ -0,0 +1,42 @@ + +// +---------------------------------------------------------------------- + +if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !'); + +/** + * 系统调试设置 + * 项目正式部署后请设置为false + */ +define('APP_DEBUG', true ); +define('BIND_MODULE','Api'); +define('ROOTTT',dirname(__FILE__).'/'); +define('ROOTTTTT',dirname(__FILE__)); +define('FONTS',dirname(__FILE__).'/Public/Admin/fonts/'); +/** + * 应用目录设置 + * 安全期间,建议安装调试完成后移动到非WEB目录 + */ +define ( 'APP_PATH', './Application/' ); + +if(!is_file(APP_PATH . 'User/Conf/config.php')){ + header('Location: ./install.php'); + exit; +} + +/** + * 缓存目录设置 + * 此目录必须可写,建议移动到非WEB目录 + */ +define ( 'RUNTIME_PATH', './Runtime/' ); + +/** + * 引入核心入口 + * ThinkPHP亦可移动到WEB以外的目录 + */ +require './ThinkPHP/ThinkPHP.php'; \ No newline at end of file