Remember we installed php when we successfully installed xampp but one last step remains for that installation to be complete. We need to be able to run php from command line this is important.
Click on start menu and right click computer and then click
properties, window 1 in the picture below would open. On window 1 click
“Advanced System Settings” window 2 would open. On window 2 click
“Environmental Variable” window 3 would open.
On window 3 under system variable click “path” window 4 would open. On window 4 in variable value add the values inside the quotation mark “; C:\xampp\php” to the end of the variable inside, don’t leave any space and click ok. Restart your system.
On window 3 under system variable click “path” window 4 would open. On window 4 in variable value add the values inside the quotation mark “; C:\xampp\php” to the end of the variable inside, don’t leave any space and click ok. Restart your system.
Open your server like this “c:\xampp\htdocs”, all your files
are going to be store inside the htdocs folder to enable us access them. Create
a folder inside the htdocs folders call it “mysite”. Open note pad create a
file inside mysite call it “myfirstfile” and save with the extention .php (I,e,
myfirstfile.php). Inside it type the following php code and save.
1: <?php echo “Zend Framework Tutoria, this is my first file ”?>
Now click windows start menu>All
Programs>Accessories>Command Prompt to start the command line. Run the
following command
a. cd c:/
b. cd xampp/htdocs
c. cd mysite
d. php myfirstfile.php
If you see the screen below you can run php from command line, ordinarily this part are not Zend framework tutorial but it just to help us understand our working environment.
If you see the screen below you can run php from command line, ordinarily this part are not Zend framework tutorial but it just to help us understand our working environment.


No comments:
Post a Comment