You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
- //Author:fuhc
- //Date:20160909
- //接口基类
-
- require_once __DIR__ . '../../BaseHotel.php';
- require_once __DIR__ . '../../Common/Function.php';
-
- class ApiBase extends BaseHotel
- {
- public $format; //接口数据类型
- public $login_user_id;
-
- function __construct()
- {
- parent::__construct();
- $this->format = "json";
- $this->login_user_id = getUserId();
- // $this->login_user_id = 1;
- if (!$this->login_user_id) {
- // echo array('code'=>'200','info'=>'wuquanxian');
- return false;
- }
- }
-
- function _get($key=''){
- return isset($_GET[$key])?$_GET[$key]:'';
- }
- function _post($key=''){
- return isset($_POST[$key])?$_POST[$key]:'';
- }
- function _request($key=''){
- return isset($_REQUEST[$key])?$_REQUEST[$key]:'';
- }
-
- }
-
- ?>
|