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 关于#python#的问题:求帮写python代码
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?