How can I execute a PHP script using command line?
Answers were Sorted based on User's Feedback
Answer / nikunj
By using CLI ( command line interface)
On command prompt type : php filename
| Is This Answer Correct ? | 33 Yes | 5 No |
Answer / 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 |
Answer / 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 |
is anybody upload more than 100mb file using PHP upload script in ONLINE SERVER (using .htaccess file)? please give some idea...
What is PHP's configuration file called?
What is php explain how php works?
In PHP how many size data can upload by default?
9 Answers Classic Infotech, PG Software,
What is laravel php?
What is the difference between php and java?
Can we use php variable in javascript?
What are the difference between array_keys() and array_key_exists() in php?
What is the difference between runtime exception and compile time exception?
how can i upload only pdf files in my website? files has not a pdf extension mantioned
Is salary fixed or variable cost?
What is namespace in php?