ThinkPHP/Mode/ApiApp.class.php

Classes

App ThinkPHP API模式 应用程序类

Constants

NOW_TIME

NOW_TIME = $_SERVER['REQUEST_TIME']

REQUEST_METHOD

REQUEST_METHOD = $_SERVER['REQUEST_METHOD']

IS_GET

IS_GET = REQUEST_METHOD == 'GET' ? true : false

IS_POST

IS_POST = REQUEST_METHOD == 'POST' ? true : false

IS_PUT

IS_PUT = REQUEST_METHOD == 'PUT' ? true : false

IS_DELETE

IS_DELETE = REQUEST_METHOD == 'DELETE' ? true : false

IS_AJAX

IS_AJAX = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' || !empty($_POST[C('VAR_AJAX_SUBMIT')]) || !empty($_GET[C('VAR_AJAX_SUBMIT')]) ? true : false