我使用codeigniter作为我项目的框架。我正在尝试从配置文件gzip我的文件
$config['compress_output'] = TRUE;
但是当我继续跟随varaiable为TRUE时,我的一个包含自动完成的表单文本框就会停止工作。 自动完成代码就是这样
$(function() {
$( "#textbox" ).autocomplete({
source: function(request, response) {
$.ajax({
url: baseurl + "home/auto_search",
data: { searchfor : $("#textbox").val()},
dataType: "json",
type: "POST",
success: function(data){
response(data);
}
});
},
minLength: 3,
}); });
这会返回我从firebug中可以看到的输出,但它不会弹出结果。 我要通过这个压缩我的输出。
答案 0 :(得分:0)
在回显控制器中的json后尝试调用exit()。