Wednesday, August 4, 2010

PHP Basics 2 - Introduction to PHP

The simple explanation is that PHP is an addition to an existing program in your web server software. PHP can be found on the web servers Apache, Microsoft IIS, and other servers (in the case phptriad, the web server used is Apache Web Server). PHP is easy to learn you know, just like the tutorial VB VB basics it also can you read in this prothelon.com.

How to use PHP is also very easy. In principle you just need to insert PHP code into the HTML tags that already exist on your site.

The way it works is like this briefly. When there is access on your web pages that contain PHP code (of course with the file extension. Php), your server will execute it and then sends the results to the web server for execution next is displayed using HTML code.

That's why you need to install your own server to test your PHP code locally. In this case, the server is the brain and functions of the browser is to display results serverPHP output to the PC client, ie your PC.

Remember that your PC does not require any special or additional to view the results of your PHP code execution.

Why?

Because of this. Your browser does not already understand and can display the HTML language. Web server will process your PHP code and display its output directly in HTML format. HTML is sent to the browser. So, the output of PHP will be accepted via the Internet by the browser in the standard HTML format. Of course, your browser does not require any extra, because she was still carrying out its duties just like when viewing a web page without any PHP script.

You also need to know that just like HTML, PHP is a scripting language or if my first time is often called the interpreter. This means that the code does not need to be compiled before use. Code that we make will be processed only when needed. It's different from programming languages like C, VB or Delphi that need to be compiled (in-compile it up in the change of form of text into machine language form that can be directly executed by the computer, typically the file extension is EXE).

Consequently good, you write PHP code in the form of text and save it in text form as well. But ...... PHP script, you need an interpreter so that the PHP server to execute PHP code is still in the form of text, while in the program compiled the results in the form of executable files do not need another program to be executed. This is the translator of the PHP server PHP code into machine language which is recognized by the computer hardware.

Oh yes, if you require more detailed elaboration of syntax-the syntax of PHP, then you can visit the php.net site. This site serves as a center for the development and official documentation from PHP (remember, PHP is open source nature, so there should be a place for gathering and coordinating its developers. (Imagine if there is no coordination, going tuh very complicated development process, right? ).

Php.net have a lot of reference material about PHP and all kinds of tips that sent the programmer from all over the world. PHP.net has information that is very great and deep understanding of PHP, but it will be terrible for beginners to jump there. That's why this site is created, in addition there are advanced materials, which make trouble for us so that tablets of the English language. But do not worry, at the end of this tutorial we will discuss about how to use the php.net site.

PHP Basics 1 - Getting Started

PHP is a scripting language that is very good and is a fitting partner for the HTML language. With the ability of PHP to create dynamic websites and a beautiful design using HTML, then almost nothing that can not be done in both languages are combined in the world wide web. Yummy again, PHP is a language that is very easy (for those who never learned C or other programming language will greatly this difference. Example of one of the most terasa difference is that we do not bother at the beginning of variable declarations, if you need a variable to stay wear).

Another advantage of PHP is an open source license, meaning that being allowed to make for free you have the additional advantage that is available a lot of support materials that are spread on the Internet (one of them on this site). Once we understand the basics, it will be very easy for us to develop our skills because there is so much material about PHP that we can study further.

I strongly recommend that you learn more about making a website using PHP is a way to learn PHP scripts that already exist. Of course, starting from the simple first, and later will be increased to a more complex as the development of our capabilities.

I myself know PHP when it comes to making web-based applications in the office. Incidentally ordered the course, and it was very easy. Enjoy aja, and still terusin reads.

You can also read an article about this PHP Learning to understand more about what and why we need pake PHP. Besides, maybe you need the time to learn PHP first learning strategies to understand the sequence of which is suggested to learn PHP.

Before you begin, you need to install a server on your computer to try the script that you create locally. (If you have space on a server that supports PHP scripts you can also ngetes there, but more complicated and costly because need FTP, internet access, duration, and so on gitu loh). If you do not have the software to add functions of web server, PHP on your computer, try searching on google keyword phptriad downloading, continue to install aja on your PC. If already completed to install, turn on Apachenya (if you already have a database MySQLnya also turn on, to how to connect PHP to MySQL see the article "linking PHP with MySQL") continues to try to type in the addresses http://localhost if dah out the Apache start page, it means Your PC is ready for ngetes PHP. (Before I forget, we must put the directory where the files will exist in c: \ apache \ htdocs, if not believe me, look in the notepad file in the directory index that is equal to the contents that appear on the home page of our time access to localhost) . You can also read articles about how to download PHP and MySQL before you start downloading.