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 csrf token and why it is required?

0 Answers  


How to create a session? How to set a value in session?

0 Answers  


What is the use of get and post method in php?

0 Answers  


What is singleton pattern in php?

0 Answers  


What is an anti csrf token?

0 Answers  


Is strcmp case sensitive?

0 Answers  


List some string function name in php?

0 Answers  


what is the abbrevation of PHP?

22 Answers   IBM,


Explain what does $_server means?

0 Answers  


Can you define an array argument as a reference type?

0 Answers  


Difference between notify url, return url in paypal payment gateway?

4 Answers   A1 Technology, Capital IQ, CMS, Essar, HCL, IAS, Karvy, L&T, State Bank Of India SBI, TATA, Tisco, WNS,


What is multidimensional array in php?

0 Answers  


Categories