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 varchar mysql?
Explain me what is the meaning of a persistent cookie?
What are headers in php?
What is meant by urlencode and urldecode?
What is rest api in php?
Write a program in php to print a table of a number?
What is difference between print and echo in php?
How many columns can be added in a table in mysql?
write a prog using insert,update,delete in this manner as output? name: phno. add button 1.name phno. edit button delete button 2.
Is rent a variable cost?
How can MYSQL functions be available with PHP?
How do you check if a variable has not been set in php?
What is cookie in php with example?
Difference between array_combine and array_merge?
What is the difference between super () and this ()?