Skip to content
Derek Jones edited this page Jul 5, 2012 · 7 revisions

Category:Libraries Category:Libraries::dbug

How to use phpDump as library for use in CI.

  1. Get latest version of phpDump from here Create system/application/libraries/dbug/dbug.php and copy source from above

  2. Create init_dbug.php in map init with this code :

<?php
if (!defined('BASEPATH'))
    exit ('No direct script access allowed');

if (!class_exists('PhpDump')) {
    require_once (APPPATH . 'libraries/dbug/dbug' . EXT);
}


$obj = & get_instance();
$obj->dbug = new PhpDump();
$obj->ci_is_loaded[] = 'dbug';
?>
  1. Usage :
$this->load->library('dbug');
...
$this->dbug->dump("test");

Category:Contributions::Libraries::PHP

Clone this wiki locally