Step 1: open cmd & go to xampp/htdocs or mamp/htdocs.
cd htdocs
Step 2: place your php file in htdocs folder.Let's say there is a file named as swap.php. So run this file in cmd as follows. write filename folled by php.
php swap.php
Step 3: if you want to edit the file in cmd enter the following command
vi swap.php
Step 4: if you want to edit the php file then press i in keyboard then edit your file. To save press escape. Then :wq
cd htdocs
Step 2: place your php file in htdocs folder.Let's say there is a file named as swap.php. So run this file in cmd as follows. write filename folled by php.
php swap.php
Step 3: if you want to edit the file in cmd enter the following command
vi swap.php
Step 4: if you want to edit the php file then press i in keyboard then edit your file. To save press escape. Then :wq


No comments:
Post a Comment