How to run php file using command prompt(cmd)


Go to
Control pannel->System>Advanced System Settings>Environment Variables
Click new

Variable name : path
Variable value : D:\wamp\bin\php\php5.3.13\ /* path of your php folder */

Click ok

Now you can run you php file using php keyword like below

D:\wamp\www>php hello.php

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s