From c10e05e6883527274140876b63bd42db7ae523bc Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 12 May 2020 11:20:40 +0800 Subject: [PATCH] =?UTF-8?q?cp=E5=90=88=E4=BD=9C=E6=96=B9=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=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