Codeigniter控制器中的回显不起作用 [英] echo in codeigniter controller is not working

查看:126
本文介绍了Codeigniter控制器中的回显不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

echo无法正常工作..配置中是否有任何设置可在codeigniter中启用echo.除了在控制器中具有回声的文件以外,所有其他文件都在工作.

echo in codeigniter controller is not working.. Is there any setting in config to enable echo in codeigniter. All other files are working except those which are having echo in controllers.

 <?php
class Blog extends CI_Controller {

    public function index()
    {
        echo 'Hello World!';
    }
}

Basically iam testing jquery and condeigniter sample script given in http://www.ryantetek.com/2009/12/how-to-create-a-simple-ajax-post-in-codeigniter-using-jquery. but i found script is not working because echo statement in controller. please help me.

错误:此网页不可用".

error: "This webpage is not available"..

推荐答案

我也遇到了同样的问题,但仅在Mac浏览器中,我对此进行了修复 在./application/config/config.php文件中,检查$config['compressed_output']是否设置为true,然后将其设置为false,因为某些浏览器不支持压缩输出.

I have face the same problem but only in mac browsers and i fixed that with this one In your ./application/config/config.php file check $config['compressed_output'] if it set to true then make it false as some browsers does not support compressed output.

这篇关于Codeigniter控制器中的回显不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆