The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

Tip : Using PHP scripts from command line

D

dman_2007

Guest
PHP can be used to script common system administration tasks. PHP scripts run from command line differ from web based PHP scripts in following way :
  1. Unlike web based scripts, there is no maximum execution time limit. A script can run for as long as it needs to be run for finishing its tasks.
  2. Any output produced by echo, print etc is immediately flushed.
  3. PHP errors are displayed in plain text instead of using html.
  4. argv and argc variables are used for retrieving command line parameters passed by user. argv is an array which contains actual command line parameters alongwith script name and argc is an integer variable which contains the total number of parameters passed to the script.
  5. Finally, use STDIN, STDOUT and STDERR constants which are streams connected to standard out, standard input and standard error.
 
MI
Back