Pages

Wednesday, October 2, 2013

Introduction to PHP: Introduction

 Written by: Lorenzo D. Alipio  (php back-end developer)


What is PHP?
According to PHP.net,
PHP is a popular general-purpose scripting language that is especially suited to web development.
Fast, flexible and pragmatic, PHP powers everything from your blog to the largest social networking site in the world.
PHP is also known as Hypertext Preprocessor. In this series, we will focusing on the basic constructs of  PHP. The second  series will be concentrating on arrays, third series will on loops, and fourth will be focusing on writing our own reusable functions.

Why learn how to program in PHP?
 There are more than 200 million websites written in PHP today. There will be a high demand for talented programmers now and in the future. Otherwise, you can just use your PHP knowledge in creating your own dynamic website.

Is PHP programming for me?
The answer to this question is all up to you. Some people fell in love with PHP since day one, while others ran and take on another programming language.

Is PHP the only language use for creating websites?
No, PHP is not the only language use for creating websites. In fact, we can build a website without even using PHP. However, if our website have dynamic contents, we can use PHP, Python, Ruby, or ASP.net.

Which web development language is better?
The answer to this question is rather argumentative in nature, but I always believe that programmer should write their web application in the language they are the most comfortable with.

Do I need to know HTML?
Not, necessarily, but it will be in extremely useful if you already know HTML, jquery, javascript.




Is there any requirements?
Yes, and here are the requirements.

1. XAMPP or equivalent Apache MySQL PHP servers installed on your computer. For alternative, there is an Apache MySQL PHP development environment called WAMP stack from  BITNAMI. I personally prefer XAMPP, because of the integrated Tomcat Apache for java applets development. If installing XAMPP, make sure it is installed on C drive and not in the program directory.
 
3. A suitable PHP source code editor. I am currently using notepad++. Install this as you would normally install windows application.

 
4. Optional (any) : NetBeans IDE, Eclipse, Aptana Studio 3.


Install the above recommended requirements on your desktop. After successful installation, run the xampp control panel. Click on start for the apache and mysql. MysQL is not needed in this tutorial, but is nice to have it running for you to discover. XAMPP is running if your control panel appeared to be like the screenshot below.


I am assuming here that XAMPP is installed in C: drive, if not just change it to your letter drive as it applies to your xampp installation location.

Open the xampp/htdocs/ directory and create a new directory called "tutorial". This is the directory where all of our practice codes are to be saved.


    xampp
          htdocs
                    tutorial

 


Click on the notepad++ desktop icon and make sure it is running correctly and it is ready for the next tutorial.

No comments:

Post a Comment