To view your php work you have to first of all get a server like the one of the XAMPP before you can view any php work on your computer system
Getting Started
First of all download a server that support php script and install it on your computer system you can get the XAMPP server from me free of charge after installing it, launch control panel either from the the shortcut icon on your desktop or on from the start--all program.
Then click on start of the Mysql and that of Apache, when they start running you can now copy your php file(not the written script but the file ) to the local disk (c:\) there you will see a the XAMPP folder and open it. Look for a folder called htdocs and open it and paste the written php script there. Then when ever you want view your php file you can just go the internet explorer and acess it fromm there just by writing http://localhost/filename.php (file name this is the name of the php file you wish to view that is in that directory ) at the address bar of the browser (make sure you always save your php file in the .php file extension).
Make sure that when ever you finish writing your php file you have to save it in that htdocs directory i.e when you finish writing your php file and you click on save to save your work once the save dialog box appears click on the my computer icon and move to the local disc open it and then move to the XAMMPP folder and save it in the htdocs folder (C:\xampp\htdocs)
Note:
You can make a folder in the htdocs that you want to be saving your php files but whenever you want to access the folder you have to do the same as explained above but now if you are accessing the folder you don’t have to put the .php file extension this way http://localhost/foldername then all the php file is going to display on the folder then you can now begin to click on them and there are going to open because there are hyperlinked to access any file from the folder with the browser address without opening the folder you can just do this http://localhost/foldername/filename.php
No comments:
Post a Comment