Last active
December 30, 2015 18:39
-
-
Save kingkarki/7869242 to your computer and use it in GitHub Desktop.
Simple Codeigniter debug function like cake php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('BASEPATH')) | |
exit('No direct script access allowed'); | |
if (!function_exists('debug')) { | |
function debug($data) { | |
$dub = debug_backtrace(); | |
echo '<pre><span style="color:blue">'; | |
echo $dub[0]['file'] . "<br/>On Line Number "; | |
echo $dub[0]['line'] . "<br/></span>"; | |
print_r($data); | |
echo '</pre>'; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment