If you want to run PHP file from windows command line, it must installed PHP in your windows system. in my system already Wamp server installed so I will show you how to run PHP file with Windows command line.
I am assuming that Wampp server is installed in your local system. you need to open windows command line and setup Wamp path.
you need to open windows command line with press (windows + R) and type “cmd” and hit enter so it will open windows command prompt shown as below.
If php installed in your system so you can check with this command “php -v”
Now you need to create php file under a folder in Wamp-> www .
I created a php file called testfile.php under test folder. I have put below line in this php file.
<?php echo "I am Azhar"; ?>
if you want to run testfile.php file, hit “php testfile.php” command. it will execute php file and show the result of php code. below screenshot will show output result.
Hello, Welcome to webdeveloperindia.in. I am a full-stack web developer. Email – [email protected] | Skype – azaruddin23. I have knowledge of PHP, Laravel, Magento 1/2, Codeigniter, WordPress, Joomla, Shopify, Git, Bitbuket, jQuery, Ajax, Javascript and ReactJS.
it is very informative post. thanks