Php

From ThorstensHome
Revision as of 22:21, 6 April 2011 by WikiSysop (Talk)

Jump to: navigation, search

Contents

Debugging

output

Here is a php trick that outputs debugging output when you want.

$handler=fopen("/tmp/debug","a");
fwrite ($handler, "hello world");
fclose ($handler);

example for variables:

$handler=fopen("/tmp/debug","a");
fwrite ($handler, var_export($variable,true));
fclose ($handler);

variables' content

var_dump

magic words

Parameters

$argv[1]