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

Write a php function to convert all null values to blank?

1313


What is symfony php?

946


How can MYSQL functions be available with PHP?

1008


What is $_ request in php?

885


How to get the directory name out of a file path name?

947


How to create an array of a group of items inside an html form?

982


what is benefit of magento?

2531


Which software is best for php?

993


what the new feature add in php 7.2?

966


What is difference between session and cookie in PHP?

963


Is php a float?

1003


Why print_r is used in php?

948


Tell me how is it possible to parse a configuration file?

936


Explain what are the two main string operators?

937


Tell me how can we determine whether a variable is set?

913