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

How to enable cURL in PHP?

1199


hello all, I need some sample placement papers in lion bridge.. can anyone help me?

2117


Which function can be used to delete a file?

1241


Tell me how can we get the error when there is a problem to upload a file?

1056


What are php variables?

1021


What is a definer in mysql?

1023


What is inheritance in php? How many types of inheritance supports php?

1048


Can we use session in mvc?

1040


What is global array in php?

1122


What's php?

1113


> symbol is used to redirect the output of a command. State Whether True or False?

1194


When to use get and post request?

1056


What is the meaning of "enctype= multipart/form-data" ?

1200


Is php better than java?

1026


Is it worth learning php in 2019?

1006