Welcome Guest, Not a member yet? Register   Sign In
Debuging in PHP
#5

[eluser]John_Betong[/eluser]
 
>>> Any other good ways to debug stuff in PHP and/or CI?
 
1. Always inherit a master controller]
2. define some common public $debug variables in the master controller


Display that does not screw up page formatting
Code:
// in controllers, views, etc
$this->debug = 'this is a test to see if it works';

// view
<?php
if (LOCALAHOST)
{
echo "<div style='clear:both;width:96%;margin:1em auto;border:solid 1px;overflow:auto'>";
   echo BR .$this->debug_001;
   echo BR .$this->debug_002;
   echo BR .$this->debug_003;
   echo BR .$this->debug_004;
echo '</div>/';
}
?&gt;

&lt;body&gt;
&lt;/html&gt;
&nbsp;
&nbsp;


Messages In This Thread
Debuging in PHP - by El Forum - 04-27-2009, 04:40 PM
Debuging in PHP - by El Forum - 04-28-2009, 03:59 AM
Debuging in PHP - by El Forum - 04-28-2009, 09:32 PM
Debuging in PHP - by El Forum - 05-01-2009, 03:12 AM
Debuging in PHP - by El Forum - 05-01-2009, 03:28 AM
Debuging in PHP - by El Forum - 05-06-2009, 04:01 AM
Debuging in PHP - by El Forum - 05-06-2009, 05:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB