dtwupu6414 2011-03-16 21:59
浏览 59
已采纳

CodeIgniter Pretty Debugging输出

Basically what I want to do is be able to set a switch somewhere: $debugging_mode = 0 or 1 that will allow me to attach a nicely formatted output to the bottom of my views.

I have written a library with a lot going on and I have some output like this:

echo var_dump(array_before_operation);

// do some operations 

echo var_dump(array_after_opertion); 

// do some more stuff 

echo "We have exactly 3 matches!";

My question is what is the cleanest way to get pretty debugging output? ( I am aware of CI's profiler, but I still need something extra )

Where is a good place to set a global debugging mode? I know zend framework has a development or production setting in the .htaccess file, but I don't see that in CI

Should I use PHP's native output buffer to collect my debugging stuff? then how could I append that to the view?

Thanks for your ideas ladies and gents!

  • 写回答

1条回答

  • duaner5714 2011-03-16 22:14
    关注

    global debugging mode: use config class http://codeigniter.com/user_guide/libraries/config.html

    cleanest way to get pretty debugging output: text file

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器