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
Write a php function to convert all null values to blank?
What is symfony php?
How can MYSQL functions be available with PHP?
What is $_ request in php?
How to get the directory name out of a file path name?
How to create an array of a group of items inside an html form?
what is benefit of magento?
Which software is best for php?
what the new feature add in php 7.2?
What is difference between session and cookie in PHP?
Is php a float?
Why print_r is used in php?
Tell me how is it possible to parse a configuration file?
Explain what are the two main string operators?
Tell me how can we determine whether a variable is set?