Welcome 微信登录

首页 / 操作系统 / Linux / RHEL5下ajax无法获取html内容的一种情况

前台JS:function test()
{
    $("#result").html("<div class=loading>系统正在处理,请稍等...</div>");
    $.ajax({
        type : "POST",
        url :"check_reg.php",
        data : $("form").serialize(),
        dataType : "html",
        success: function(msg){
            $("#result").html(msg);
        },
        error:function(){
            $("#result").html("域名状态繁忙,请稍后检测。");
        }
    });
} 后台check_reg.php:……$result = file_put_contents("scripts/script_temp.txt",$string);$url = Config::$base_url."scripts/script_temp.php";//服务器已做了host映射$res = Fetcher::down($url);//用的是curl echo "<pre>";print_r($data);echo "</pre>";exit;……在Ubuntu下能获取数组$data的值,但在RHEL5下怎么也获取不到。开始以为是host没映射,但用了一个test.php(只有一条简单的输出语句)测后能获取内容;后来怀疑是print_r函数的问题,于是改为用<table>标签的形式,问题依旧;改用eval()函数,代码中用return返回结果,问题解决。用LFS从零开始构建完整Linux系统Ubuntu 11.04 安装/更新 Firefox 6 正式版相关资讯      RHEL 
  • Red Hat Enterprise Linux 7.2 发  (11/20/2015 13:39:31)
  • 使用Windows 2003 Server R2给RHEL  (01/03/2015 09:14:16)
  • Red Hat Enterprise Linux 5.11 发  (09/17/2014 09:40:49)
  • 在VMware中安装RHEL6.2(下)——   (01/07/2015 12:24:47)
  • 红帽企业 Linux (RHEL) 7.1 Beta   (12/12/2014 09:44:13)
  • Red Hat Enterprise Linux 6.6   (08/13/2014 13:43:14)
本文评论 查看全部评论 (0)
表情: 姓名: 字数