XMLHttpRequest和HttpRequest有什么区别 [英] What are differences between XMLHttpRequest and HttpRequest
本文介绍了XMLHttpRequest和HttpRequest有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Zend框架和其他框架(例如Symfony)中,有一个名为isXMLHttpRequest()的方法来确定是否为XMLHttpRequest.我不知道框架或PHP如何区分XmlHttpRequest和HttpRequest?
In Zend Framework and other framework such as Symfony, there is a method named isXMLHttpRequest() to determine this is XMLHttpRequest or not. I wonder that how can framework or PHP distinguish between XmlHttpRequest and HttpRequest?
if($this->_request->isXmlHttpRequest())
{
//code here
}
推荐答案
查看全文