PHP Developer Question:
Download Questions PDF

How to execute a PHP script using command line?

Answer:

Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program.
Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.

Download PHP Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Can you please explain the difference between mysql_fetch_object and mysql_fetch_array?I am trying to assign variable the value of 0123, but it keeps coming up with a different number, what is the problem?