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
Explain how is it possible to set an infinite execution time for php script?
Should I use mysqli or pdo?
Explain about the $_GET variable of PHP?
Explain me what is the meaning of a persistent cookie?
What is the use of htmlspecialchars in php?
Can I use php in visual studio?
How can you get the size of an image in PHP?
What are helpers in php?
How could I install codeignitor ?
Is uploaded file php?
What are the difference between array_keys() and array_key_exists() in php?
What is the $_ server php_self variable?
What are the different tables(engine) present in mysql, which one is default?
Tell me can the value of a constant change during the script's execution?
What are the different data types in javascript?