YII里面的Yii::app()->request->isAjaxRequest? if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') CI 有的
$this->input->is_ajax_request() /** * Is ajax Request? * * Test to see if a request contains the HTTP_X_REQUESTED_WITH header * * @return boolean */ public function is_ajax_request() { return ($this->server('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest'); } |
|