doujiufutaog59220 2012-04-04 21:47
浏览 37

当从另一个控制器调用时,Codeigniter HMVC控制器不会打印

I don't understand why I get return from my controllers but it wont print a simple var_dump.

Steps I follow:

  1. modules/controllers/home.php

    $result = modules::run("apis/c_$api/data", $parameters);
    var_dump($result); //works
    
  2. modules/apis/controllers/c_api1.php

     function data()
     {
    
        #....
        case 'getDataInfo':
            echo 'baa'; //Not working
            $result = simplexml_load_string($this->api1->getDataEntry($parameters['id'], false));
            var_dump($result); //Not working
            break;
        #....
    
    }
    

Any ideas why this happens? The fact that returning $result works but not the echo or var_dump()

Update

The function works because if I comment the $result line inside the case, I have no output. That means that the case works, but even so I don't get the echo

  • 写回答

2条回答 默认 最新

  • dpxw7293 2012-04-04 21:52
    关注

    The most obvious cause would be that case is not being matched.

    Without seeing more of api1.php, I am forced to speculate.

    评论

报告相同问题?

悬赏问题

  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测