How to Start Learnig PHP

Courant
Learning PHP is easy an in the following article I will show you hot to start, the first step. If you want to learn PHP language, you have to prepare your computer to be able to compile your code. PHP is a scripting language that runs on a server. Most used server is Apache. There are some other servers like Tomcat or IIS, but I will recommend Apache.

If you are working on a windows computer you should install a windows compatible server. Most hosting webservers are using linux, but you can learn programming language even on a windows pc. All you have to do is to install a local webserver, on your pc. Installing a web server on your PC. WampServer is an open source project, free to use. Navigate to wampserver . Click DOWNLOAD WampServer 2.0h . It will take you to SourceForge.net website. There you have to download windows installer. Usually it is downloaded automatically and no action is needed before downloading begins. A download file message will appear and you have to click yes to download. After downloading is finished, click and run the installer. Answer Yes, Next, I Agree , and chose a folder to install, for example c:\wamp. The installer will install Apache server, php and mysql on your computer in c:\wamp folder. It instals apache, mysql database and php (AMP, WAMP stand for Windows Apahe MySQL PHP, LAMP stand for Linux Apache MySql PHP, XAMP stand for any system Apache MySql Php). After finishing installing, click Launch server now. The server starts and a wite speedometer like icon in system tray will display. If icon is white your server is up and running. If Windows Firewall (or any other firewall you are using) pops a confirmation message asking you to allow web-server running click allow/yes/unblock button, depending on firewall message.

To test that your web-server is running open your favorite web-browser IE, Mozilla Firefox, Opera, Google Chrome, and type in http://localhost/ If you see a welcome page, apache server is installed and you can start write php scripts. First php program to test is "Hello world! ". Navigate in your computer to c:\wamp\www\ This is the root of web-server. Edit a new file called hello.php and save it to C:\wamp\www\hello.php Write in that file the following lines of code starting with : Save file then open http://localhost/hello.php in a new browser. Hello world ! 2009-04-16 15:04:19 message will display (the date and time will be your computer time). For more information about php programming you should visit official website. There are many users contribution on each function you may want to use. It's a strong community and there are lots of examples. Also a big advantage is that almost every web-host company offers php and mysql support.

Published by Courant

A college student who love technology and minimal running. I have run in everything from Newtons down to Luna Sandals and love to share my minimal running knowledge  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.