Скачать презентацию PHP Pattadon Sintusak ID 49541154 1 Content Скачать презентацию PHP Pattadon Sintusak ID 49541154 1 Content

eeffb22680d32bd597b325cf363f599b.ppt

  • Количество слайдов: 17

PHP Pattadon Sintusak ID. 49541154 1 PHP Pattadon Sintusak ID. 49541154 1

Content n n n History of PHP What’s PHP? Purpose of PHP Structure of Content n n n History of PHP What’s PHP? Purpose of PHP Structure of PHP Language Reference Different between PHP and ASP PHP Programming 2

HISTORY of PHP n n PHP stands for“ Professional Home Page” It’s first build HISTORY of PHP n n PHP stands for“ Professional Home Page” It’s first build in 1994 Developer is Mr. Rasmus Lerdorf Nowadays, PHP is the fourth version, n n n The first version was known as Personal Homepage Tools in 1994 to 1995 The second was PHP/FI in middle of 1995 Version 3 was known as PHP 3 firstly used in 1997 PHP Programming 3

Developers of PHP w w w w w Zeev Suraski, Israel Andi Gutmans, Israel Developers of PHP w w w w w Zeev Suraski, Israel Andi Gutmans, Israel Shane Caraveo, Florida USA Stig Bakken, Norway Andrey Zmievski, Nebraska USA Sascha Schumann, Dortmund, Germany Thies C. Arntzen, Hamburg, Germany Jim Winstead, Los Angeles, USA Rasmus Lerdorf, North Carolina, USA PHP Programming 4

What’s PHP? n n It’s a Script language for showing webpage , arrange in What’s PHP? n n It’s a Script language for showing webpage , arrange in Server Side Script group like ASP Insert in HTML for working Can compile in UNIX, Windows NT/2000/XP, Windows 9 x High efficiency , especially when connect with Database such as My. SQL, ms. SQL, Sybase and Postgre. SQL etc. PHP Programming 5

PHP can do !! n n n CGI Database-enable web page Database Adabas D PHP can do !! n n n CGI Database-enable web page Database Adabas D DBase Empress File. Pro Informix Inter. Base m. SQL My. SQL Oracle Postgre. SQL Solid Sybase Velocis Unix dbm PHP Programming 6

Purpose of PHP n n n n Open source No cost implementation – PHP Purpose of PHP n n n n Open source No cost implementation – PHP is free! Server side Crossable Platform HTML embedded Simple language Efficiency XML parsing Server side Database module File I/O Text processing Image processing PHP Programming 7

Working of PHP n n Working on Server Working with HTML Can insert PHP Working of PHP n n Working on Server Working with HTML Can insert PHP commands as you want in HTML document Show output by Web Browsers PHP Programming 8

Language structure of PHP n XML style <? php language command PHP ? > Language structure of PHP n XML style Example. PHP Programming 9

Language structure of PHP(cont(. n SGML style <? Language command PHP ? > Example. Language structure of PHP(cont(. n SGML style Example. ? > echo “Hello World !

Language structure of PHP(cont. ( n Java Language style <script language=“php”> language command PHP Language structure of PHP(cont. ( n Java Language style Example. >script language=“php<” echo “Hello World; ” />script< PHP Programming 11

Language structure of PHP(cont(. n ASP Style <% language command PHP %> Example. %> Language structure of PHP(cont(. n ASP Style <% language command PHP %> Example. %> echo “Hello World !

Language structure of PHP(cont(. n n XML style is the most popular style. Output Language structure of PHP(cont(. n n XML style is the most popular style. Output is Hello World! I am PHP Notice -Language structure is similar to C and Perl -use ( ; ) to end each command. File must save in. php (or php 3 ( PHP Programming 13

Language Reference n n Comments -similar to comment in C, C++ and Unix Example. Language Reference n n Comments -similar to comment in C, C++ and Unix Example.

“Echo” command n n is a command for showing output at browser program format “Echo” command n n is a command for showing output at browser program format echo statement 1 or variable , 1 statement 2 or variable 2, statement 3 or variable 3… , statement is bestrided by double quote (“ “) or single quote (‘ ‘) Variable of PHP always begin with $ like Perl PHP Programming 15

Example 1 intro. php >HTML< >HEAD< >TITLE>Example – 1</TITLE< >/HEAD< >BODY< <? phpinfo() ; Example 1 intro. php >HTML< >HEAD< >TITLE>Example – 1/HEAD< >BODY< >BODY< />HTML< PHP Programming 16

Example 2 (date. php) >HTML< >HEAD< >TITLE> Example – 2</TITLE< />HEAD< >BODY< Today’s Date: Example 2 (date. php) >HTML< >HEAD< >TITLE> Example – 2HEAD< >BODY< Today’s Date: BODY< />HTML< Today's Date: Thursday Mar PHP Programming 17