Part of the EllisLab Network
x
 
Create New Page
 View Previous Changes    ( Last updated by Zacharias Knudsen )

dbug

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';
?>


3. Usage :

$this->load->library('dbug');
...
$this->dbug->dump("test");

Category:Contributions -> Libraries -> PHP