How can I execute a PHP script using command line?
Answer Posted / tamilselvan
PHP script using command line can be executed using SAPI
(Server Application programming Interface). Using SAPI
Command Line Interface the PHP code can be passed to execute
directly
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 ? | 12 Yes | 4 No |
Post New Answer View All Answers
Define anonymous classes in php7?
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
Can we use php variable in javascript?
Who is the father of php and what is the current version of php and mysql?
Php being an open source is there any support available to it?
How do you find the length of a string in php?
Why do we show php code in browser?
What is array and function?
What is the function to count elements in an array in PHP?
How to check if a string contains a character or word in php?
Where sessions stored in PHP?
Write down the code for save an uploaded file in php.
Explain php explode() function.
Is age nominal or ordinal?
How send email in php?