How can I execute a PHP script using command line?
Answer Posted / indra
By using CLI ( command line interface)
On command prompt type : php filename
Example:
Php –r ‘print_r(get_defined_constanrs());’
From a shell, php –v will display whether the SAPI is CLI or CGI
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Steps for the payment gateway processing?
What is difference between get and post in php?
Write a program to display table of a number using php?
How is a constant defined in a PHP script?
How to support multiple-page forms?
What is difference between echo and print_r in php?
What is member function?
What is php addslashes?
Does wordpress still use php?
What is the purpose of using php?
What is get and post method in php?
What is an anti csrf token?
Is php 7 backwards compatible?
Is null in php?
How to enable cURL in PHP?