Command line scripting in PHP
When talking about command line scripting, most people think of Python or Perl. But it’s good to know that you can do something similar with PHP too!
#!/usr/bin/php <?php # /etc/php5/cli/php.ini # The configuration file for the CLI version of PHP. print "Hello, World!\n"; ?>
You can execute it with “
./hello.php” or “
Notice that the command line version of PHP uses a different
Consult this page to learn more.