How can I execute a PHP script using command line?
Answer Posted / indra
By using CLI ( command line interface)
On command prompt type : php filename
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 ? | 4 Yes | 2 No |
Post New Answer View All Answers
What good is polymorphism?
What is php ci?
How to check a key exist in an array?
What is the advantage of runtime polymorphism?
what is constructor
Why do we use sessions in php?
What happens if an expected input field was not submitted?
What is difference between echo and print in php?
What is php static function?
How long does a php session last for?
Does php support multiple inheritances?
What is php and features of php?
Tell me what is the difference between ereg_replace() and eregi_replace()?
Which php framework is fastest?
What are global variables in php?