PHP处理Ajax请求与Ajax跨域

判断是否为Ajax请求

请求URL: test.php

请求结果:

Ajax发起JSONP跨域请求

请求URL: http://demo.helloweba.net/phpajax/jsonp.php

请求结果:

Ajax跨域请求

请求URL: http://demo.helloweba.net/phpajax/ajax.php

请求结果: