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
Tell me when a conditional statement is ended with an endif?
What is the best website to learn php?
How to delete cookie files on your computer?
What is a closure in php?
What is $_session in php?
What is php's mysqli extension?
what is difference between PHP4 , PHP5
Can I learn php in a month?
What are php parameters?
Can we use onclick in submit button?
How to join multiple strings into a single string?
What types of MYSQL function available for affecting columns
How to read a file in php?
What Is a Persistent Cookie?
Explain setcookie() function in php?