Pages

Monday, December 10, 2012

Execute PHP5 script from command line in ubuntu

  1. To execute a PHP script from the command line in Ubuntu you must have php5-cli installed.
  2. sudo apt-get install php5-cli
  3. After cli is installed, go to the folder where the script resides. For ex: 
  4. cd /var/www/test
    php5 index.php
    

No comments: