ajax不会在php中返回任何响应 [英] ajax does not returns any response in php
本文介绍了ajax不会在php中返回任何响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
AJAX请求不会在托管服务器中返回响应。
我在localhost中测试过它正常工作但是当我在托管服务器上测试时它会返回空白响应。
我使用var_dump检查了变量中的值。它有价值,但是当我使用json_encode方法回显它时,它返回空白响应。
AJAX request not returns response in hosting server.
I have tested it in localhost it works normally but when I am testing it in hosting server it returns blank response.
I have checked values in variable using var_dump. It is having value but when I echo it using json_encode method it returns blank response.
推荐答案
solved it. problem in values some values are not in collation utf-8. So i had convert it using function:
<pre lang="PHP">
function utf8ize(
d){
if (is_array(
d) { if (is_array(
d)){
foreach(
d)) { foreach (
这篇关于ajax不会在php中返回任何响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文