1 / 17

PHP

PHP. Pattadon Sintusak ID. 49541154. Content. History of PHP What’s PHP? Purpose of PHP Structure of PHP Language Reference Different between PHP and ASP. HISTORY of PHP. PHP stands for “Professional Home Page” It’s first build in 1994 Developer is Mr.Rasmus Lerdorf

Download Presentation

PHP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PHP Pattadon Sintusak ID. 49541154

  2. Content • History ofPHP • What’s PHP? • Purpose of PHP • Structure ofPHP • Language Reference • Different betweenPHP andASP PHP Programming

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

  4. Developers of PHP • 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

  5. What’s PHP? • It’s aScript language for showing webpage, arrange in Server Side Script group likeASP • Insert inHTML for working • Can compile in UNIX, Windows NT/2000/XP, Windows 9x • High efficiency,especially when connect with Database such as MySQL, msSQL, Sybase andPostgreSQL etc. PHP Programming

  6. PHP can do !! • CGI • Database-enable web page • Database Adabas D InterBase Solid DBase mSQL Sybase Empress MySQL Velocis FilePro Oracle Unix dbm Informix PostgreSQL PHP Programming

  7. Purpose of PHP • 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

  8. Working ofPHP • Working onServer • Working with HTML • Can insert PHP commands as you want inHTML document • Show output byWeb Browsers PHP Programming

  9. Language structure ofPHP • XML style <?php language commandPHP ?> Example. <?php echo “Hello World ! <br>”; echo “I am PHP”; ?> PHP Programming

  10. Language structure ofPHP(cont.) • SGML style <?Language commandPHP ?> Example. <? echo “Hello World ! <br>”; echo “I am PHP”; ?> PHP Programming

  11. Language structure ofPHP(cont.) • Java Language style <script language=“php”> language commandPHP </script> Example. <script language=“php”> echo “Hello World”; </script> PHP Programming

  12. Language structure ofPHP(cont.) • ASP Style <%language commandPHP %> Example. <% echo “Hello World ! <br>”; echo “I am PHP”; %> PHP Programming

  13. Language structure ofPHP(cont.) • XML style is the most popular style. • Output is Hello World ! I am PHP • Notice - Language structure is similar to C andPerl - use( ; ) to end each command. • File must savein.php (orphp3) PHP Programming

  14. Language Reference • Comments - similar to comment inC, C++ and Unix • Example. <?php echo “Hello !”; // comment 1 line /* at least 2 lines */ echo “World”; # comment in shell-style ?> PHP Programming

  15. “Echo” command • is a command for showing output atbrowser program • format echo statement1 or variable1, statement2or variable2, statement3or variable3, … • statementis bestrided bydouble quote (“ “) orsingle quote (‘ ‘) • Variable ofPHP always begin with$ like Perl PHP Programming

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

  17. Example 2(date.php) <HTML> <HEAD> <TITLE> Example –2</TITLE> </HEAD> <BODY> Today’s Date: <? print(Date("l F d, Y")); ?> </BODY> </HTML> Today's Date: Thursday March 10, 2003 PHP Programming

More Related