Php

From Wiki2
Revision as of 11:48, 13 December 2012 by Tim (talk | contribs)

bits of code I always forget

reading command line arguments

<syntaxhighlight> <?php echo count($argv); if (count($argv)<2){ //if no command line argument echo("script requires command line argument with name of db to backup"); exit(); } $db = $argv[1]; ?> </syntaxhighlight>

PHP questions