When you use it for scripting, keep in mind that you need to get command line arguments:
For example, if the command line is:
- Code: Select all
myscript.php Hello myfile.txt
Arguments must be retrieved using $argv, so in the previous example:
- Code: Select all
$argv[1] => Hello
$argv[2] => myfile.txt
for more info:
http://php.net/manual/en/reserved.variables.argv.php
