To run any php file you need to install Apache web server on your localhost. Also you need to install MySQL server for any database programming. You can install these separately or there is easy way to achieve the same by installing XAMPP.
XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start.
You have already learned to write a basic PHP program in the previous page. Here is that program.
1 2 3 4 5 6 7 | <html>
<body>
<?php
echo "MY First PHP Program";
?>
</body>
</html> |
Write this program in a notepad and save as firstprogram.php
Now to run this do the following steps.
Note: You can also create any folders inside htdocs folder. For ex. create a folder called “test” and copy firstprogram.php to “test”, then the address will become http://localhost/test/firstprogram.php
Description :
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Submit #Terms of Use
Copyright©2011 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com | Powered by Dhyeya