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.

No comments:

Post a Comment