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 get and post method in php?

0 Answers  


discuss the issue of software theft in ghana and how it has affected the economy

0 Answers  


How to create an empty array in php?

0 Answers  


we have two tables first one is EMPLOYEE having EmpID, EmpNAME, Second table is SALARY table having id, salary Write a query to get name of those person who having more than 10000$ salary

3 Answers   Net Solution,


How many data types are used by php?

0 Answers  






Explain how we can retrieve the data in the result set of mysql using php?

0 Answers  


How to support multiple-page forms?

0 Answers  


Do you have to initialize variables in php?

0 Answers  


How to remove the new line character from the end of a text line in php?

0 Answers  


What is use of isset function in php?

0 Answers  


Is empty array php?

0 Answers  


What is implode() in php?

0 Answers  


Categories