Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How can I execute a PHP script using command line?

user-image
Question added by Ayman Shorman , Devops Manager , Smart Charging Technologies
Date Posted: 2013/06/12
Amr Olabi
by Amr Olabi , Technical Team Lead , Smart Charging Technologies

In command line run the following: php -a ;This will open interactive shell for php which can be used to write your script and run it immediately.
php -f yourScriptFile.php ; This will run the php script in your script file and return the output of execution.
php -r $PHPScript ; This used as run-as-you-type PHP, which is really useful for checking little snippets.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.