Php

From ThorstensHome
Revision as of 15:50, 10 January 2015 by ThorstenStaerk (Talk | contribs)

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

To output an array use

echo serialize($array)

magic words

Parameters

$argv[1]