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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

When to use get and post request?

547


Is server side a session?

494


What is difference between base_url and site_url?

492


Explain what is the difference between $var and $$var?

522


Explain me what is the importance of "method" attribute in a html form?

494






What is the integer?

564


Does php 7 support multiple inheritance?

507


Explain me how to include a file to a php page?

540


Can you explain, when to use if-else if-else over switch statements?

531


What is list in PHP?

636


What is query string php?

532


Explain the advantages of using PHP?

546


How many types of array are there in php?

567


How to get the IP address of the client/user in PHP?

513


How to register a variable in PHP session?

520