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 memcache?
Explain Whitespace Characters?
How to genrate report in wordpress cms
What is the difference between php4 and php5?
What is inheritance in php with example?
Which will start a session?
What is the difference between $var and $$var?
How is a constant defined in a PHP script?
What is the mysql injection?
What happens when submit button is clicked?
Do csrf tokens expire?
What is php pathinfo?
How is it possible to return a value from a function?
What is binary safe function in php?
Is c similar to php?