zf判断请求是否来自XMLHttpRequest对象的方法
时间:2021-07-01 10:21:17
帮助过:21人阅读
- /*
- * * Is the request a Javascript XMLHttpRequest?
- * * Should work with Prototype/Script.aculo.us, possibly others.
- * * @return boolean
- */
- public function isXmlHttpRequest() {
- return (
- $this->getHeader('X_REQUESTED_WITH') == 'XMLHttpRequest');
- }
|