Difference between revisions of "Php"

From ThorstensHome
Jump to: navigation, search
(magic words)
Line 17: Line 17:
 
== magic words ==
 
== magic words ==
 
* [http://www.php.net/manual/en/language.constants.predefined.php magic constants]
 
* [http://www.php.net/manual/en/language.constants.predefined.php magic constants]
 +
* [http://php.net/manual/de/reserved.variables.server.php $_SERVER]
  
 
= Parameters =
 
= Parameters =
 
$argv[1]
 
$argv[1]

Revision as of 22:21, 6 April 2011

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]