Minggu, 22 Juni 2014

Basics of Web Programming Using PHP Language


PHP (Hypertext Preprocessor) is a web-based programming language that works on the server. Because it works on the server-side source code (source code) files can not be viewed on the client side. Many are asking what is the difference in PHP with HTML? The difference is that PHP is used to build dynamic HTML while just to build a static web.

When we create a web page with an HTML page will indicate the appropriate HTML code that we create. To change the content and the page views we have to change the source code of the html file. While in PHP without changing the source code of the web pages we will show different contents without having to change the source code files aspects. So the PHP web programming language called dynamic.

PHP How it Works?

The following diagrams show how it works.


The simplest example is when you open the site ilmusoft.com then you have made a request to the index.php file server. So the same request to the request to http://www.ilmusoft.com http://www.ilmusoft.com/index.php. Index.php file I created in order to perform a query to the database, take the latest article to appear on the front page. So the front page of the site will change it when there is a new article that I wrote. If I use index.html then I have to manually edit the HTML source code that whenever there is a new article. Is not it a hassle?Preparation Learning PHPBecause the server side work then we have to save the file on a server that supports the PHP language, for example the Apache Web Server. If you are learning then can use an application called XAMPP. There already exist at the same apache server and mysql database. When finished installing XAMPP then you should put the php file in the default htdocs folder is C :/ Program Files / xampp / htdocs. For example, C :/ Program Files / xampp / htdocs / training. Then go to your web page by typing http://localhost/latihan. Previously do not forget to run apache.



Basic PHP Syntax

PHP language is stored in the form of a text file php extension (. Php). PHP code is enclosed between the <? Php and?>. Here is a simple PHP source code.



<? php

echo "Hello World!";

?>


Save with terserah.php name. When opened in a browser you will see the words Hello World! appear on the screen.

What's Next?

The last one is up to you. PHP is world wide, not enough to just visit one site that discusses PHP or read a book alone. We should discuss frequently visited sites in PHP and read many books or ebooks on PHP. Php.net PHP is the official site. If you seriously want to learn then explore the internet and read a lot of booksRead also cheap website services. 

Congratulations learn ...

Tidak ada komentar:

Posting Komentar