[ezc_accordian_group] [ezc_accordian title=’FirePHP in WordPress’]
To Add FirePHP code to a site:
Enable the FirePHP plugin. In the FirePHP console (click on the little blue bug) Make sure that Options > Modify User-Agent Header is Checked. Here is the link to Plugin Site: WordPress FirePHP plugin • Inchoo
To Delete FirePHP code from a site:
Disable the plugin.
To show variables in the Firebug Console:
Regular variable: fb('Var: ' . $name); Array: fb($lines_array, 'Array: ');
'test single quotes' "test double quotes" [/ezc_accordian]
[ezc_accordian title=’Debug Flowchart’] [/ezc_accordian]
[ezc_accordian title=’PHP Use <pre> tags to show actual code or variables’] echo "<pre>"; print_r($var); echo "</pre>";
You can show values for an array as well by sending the array variable: echo "<pre>"; print_r($array); echo "</pre>";
Or send a function as the variable and see the results: echo “<pre>”; print_r(any_function); echo “</pre>”;
* Use AHK ^e
[/ezc_accordian] [ezc_accordian title=’PHP Write a debug.txt file to site root directory’] ob_start(); var_dump($some_variable); $tut = ob_get_clean();
$fh = fopen(‘debug.txt’, ‘w’) or die(“can’t open file”); fwrite($fh, $contents); fclose($fh); [/ezc_accordian] [/ezc_accordian_group]
Leave a Comment
You must be logged in to post a comment.