How do you run a php script from the command line?



How do you run a php script from the command line?..

Answer / suren

Answer :
you can execute thefrom anywhere like a command prompt.

in unix like OS you use the following:
/path/to/php -f /path/to/script.php

For windows OS's use the following
c:\path\to\php.exe -f c:\path\to\script.php

and U can get the information by running the
C:\path\to\php.exe -f

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More PHP Interview Questions

What is the difference between associative array and indexed array?

0 Answers  


What is mod_php?

0 Answers  


how to register website in internet

2 Answers  


What is php default argument?

0 Answers  


What is laravel php?

0 Answers  






What is string and its function?

0 Answers  


What is .htaccessfile and use of this file

5 Answers  


What is use of header() function in php?

0 Answers  


What is the mysql injection?

0 Answers  


Is java is better than php?

0 Answers  


What is cakephp framework?

0 Answers  


what is php stands for?

23 Answers   Infosys, Satyam, Torque Infotech,


Categories