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

Steps for the payment gateway processing?

959


What is difference between get and post in php?

1093


Write a program to display table of a number using php?

893


How is a constant defined in a PHP script?

983


How to support multiple-page forms?

922


What is difference between echo and print_r in php?

847


What is member function?

986


What is php addslashes?

1022


Does wordpress still use php?

946


What is the purpose of using php?

1010


What is get and post method in php?

957


What is an anti csrf token?

883


Is php 7 backwards compatible?

983


Is null in php?

896


How to enable cURL in PHP?

1098