This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

dimanche 25 mars 2012

PHP


 PHP

1. Origins

The PHP language was created in 1994, the site of Rasmus Lerdof. He had created a personal page with his resume, he wanted to keep track of the passage of our visitors and to do so, he invented some scripts. Soon, users who discover the site, seeking a copy of the language. This is the beginning of success for Rasmus who decides that his language will be made freely available to users (at least under the GNU license after the Linux world). A community of developers has helped improve the language (currently version 4). For the record, know that the original PHP meant "Personal Home Pages", given the power of this language programmers have opted for "PHP: Hypertext Preprocessor".

2. Specificities compared to other dynamic languages

There are many languages
​​for dynamic web pages. There are: JavaScript, ASP language from Microsoft, JSP (Java Server Pages), Perl, CGI scripts (Common Gateway Interface) ... My purpose is not to scratch a particular language. It would be fruitless to go this route. Each language has its fans and detractors.However, the PHP language combines several advantages that make it particularly interesting for a beginner or a school setting.

The speed
Experts agree that this language generates scripts particularly fast in terms of response time of the server. This is because the PHP can be integrated into the Linux kernel. On the Web, most servers run on a Linux platform with Apache.

Security
With PHP, your scripts will remain confidential. The server merely refers to the HTML browser of the user who visits your site.

Maximum compatibility
As I said before, the server returns only HTML to the browser. This ensures maximum compatibility with most browsers. This compatibility is also particularly interesting regarding operating systems. There are PHP distributions for Linux, Windows, Windows NT, Macintosh, FreeBSD, Solaris and even Amiga. To conclude on this point, the PHP language is compatible with many databases. A PHP script can query a Mysql database, Access, Oracle, Dbase, PostgreSQL, filepro ...

Free
PHP scripts are mostly developed under the GNU license. This is particularly interesting in a school setting. Different software are used almost all the free field (Apache, PHP libraries and distributions, Mysql database, specialized publishers ...)

Completeness
The language has many more features than its direct competitor to Microsoft's ASP. Furthermore the source code is free, all additions and extensions are available to developers. Thus, the bugs are quickly fixed.

The simplicity
The PHP is relatively easy to learn. One can quickly develop functional sites. People who have some knowledge of programming should quickly adapt to this language. The syntax is similar to that of the C language PHP does not generate rejection phenomenon as with Perl.

Documentation available in French
Unlike some other languages, there are many PHP related resources on the Web. There is a community of developers and generally available (see paragraph 4 "Bibliography and Online Resources"). PHP is currently in vogue on the Net. Experts observe a migration of many sites of ASP (Microsoft) to PHP.However, be aware that the sites most demanding professionals require more sophisticated languages
​​(but also more difficult to control) such as Java.

3/Installation of the various modules

Before you can develop in PHP, you must first install on your machine a few applications or modules. Thus, we have to emulate a local Web server (we'll use Apache to do this). We will cover the installation under Windows.

Play simplicity: EasyPHP
"Distribution" EasyPHP is the easiest to use for a beginner. It is available only for Windows 95 or higher. This is a "distribution" French.
Get the installation file on the site http://www.easyphp.org. This is an executable (*. Exe) that installs like any program. So just follow the installation procedure.
You just installed a server Apache, the PHP module (multiple versions are installed 2 to 4), a server MySQL databases and phpMyAdmin utility (back on the last two "applications" later in thisdocument). An icon is now visible on the taskbar (left of clock)

Using "EasyPHP" To do this, right click on the icon and choose "Start / Stop". This has the effect of activating the Apache server (the server and MySQL database see below). The server shutdown is the same way. By choosing "Quit" button closes the manager, the icon disappears from the taskbar. To find it: Start -> Programs -> EasyPHP

Apache Server Test: Start your browser, decline the proposed connection (or choose to work offline). Enter the following address in the appropriate area http://localhost or http://127.0.0.1 If you get the home page of the www directory, it means that the Apache server and PHP are working properly. You can right click on the icon and choose "local web" ..

Where to place my scripts? The working directory of EasyPHP is called www, it is normally in Program Files / EasyPHP (or in the installation directory chosen). In the www directory, there is a directory project1 (which you can rename). You must create a subdirectory for each project, to obtain a work area clear and consistent. Your scripts will be available to http://localhost/sous-répertoire/script.php3