Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can I execute a PHP script using command line?

Answer Posted / indra

By using CLI ( command line interface)

On command prompt type : php filename

Example:
Php –r ‘print_r(get_defined_constanrs());’

From a shell, php –v will display whether the SAPI is CLI or CGI

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What good is polymorphism?

939


What is php ci?

994


How to check a key exist in an array?

1091


What is the advantage of runtime polymorphism?

942


what is constructor

1609


Why do we use sessions in php?

965


What happens if an expected input field was not submitted?

968


What is difference between echo and print in php?

927


What is php static function?

1041


How long does a php session last for?

1035


Does php support multiple inheritances?

1002


What is php and features of php?

990


Tell me what is the difference between ereg_replace() and eregi_replace()?

1146


Which php framework is fastest?

1003


What are global variables in php?

954