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
What is api used for?
What is the best php framework 2018?
Why do we use csrf token?
What is difference between count or sizeof function in php?
How do you connet mysql database with php?
What is use of htmlspecialchars php?
What does echo mean in php?
How many types of session are there?
What is die in php?
How to retrieve values out of an array?
What is meant by an associative array?
Does php have block scope?
How do I use isdigit function?
Is it difficult to learn php?
What is html used for?