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 are php expressions?
How can we access the data sent through the url with the post method?
What is session and why do we use it?
What does the unset() function means?
Is php harder than javascript?
Which php mvc framework is best?
What is the use of is_array() and in_array()?
How we get browser details of clients machine?
How to check a variable is array or not in php?
How to pass variables by references?
Can I run php without xampp?
Is php front end?
How many types of session are there?
What is a variable cost example?
Explain the difference between array_merge() and array_combine()?