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