从php代码中获取警报为空

Getting alert empty from php code ?

本文关键字:获取 php 代码      更新时间:2023-09-26

我不知道为什么在以下js代码警报是空的没有html代码,我的视图有html代码,和my_class工作对其他控制器为真,当我得到警报这意味着它是工作真正的js代码,但没有html的php代码的数据。我该怎么办?

function guide_show($offset = 0) {
$find = $this -> input -> post('find');
$where = "name LIKE '%$find%' OR phone LIKE '%$find%' OR mobile LIKE '%$find%' OR address LIKE '%$find%' OR date_submit LIKE '%$find%' OR useradmin_submit LIKE '%$find%'";
$table = "guide";
$url_pag = "admin/submits/guide_show";
$order = "id";
$data = $this -> my_class -> show($where, $table, $url_pag, $order, $offset);
    $this->load->view('admin/guide_show', $data);
}
jQuery:

$.ajax({
    type: "POST",
    dataType: "html",
    url: url,
    data: dataString,
    cache: false,
    success: function (html) {
        alert(html)
    },
    "error": function (x, y, z) {
        // callback to run if an error occurs
        alert("An error has occured:'n" + x + "'n" + y + "'n" + z);
    }
})

这里是My_class(library): http://pastebin.com/6DxjmBFC

这是我的htm代码在视图(guide_show): http://pastebin.com/mtubjzvB

检查Firebuq -> NET [Expand]并显示响应体