php
play

PHP Chapter 1 Introduction Survey Have you ever written a web - PowerPoint PPT Presentation

MCIS/UA PHP Training 2003 PHP Chapter 1 Introduction Survey Have you ever written a web application? Have you used any of the following languages? C PHP C++ Java Perl Have you ever written an object-oriented


  1. MCIS/UA PHP Training 2003 PHP Chapter 1 Introduction

  2. Survey • Have you ever written a web application? • Have you used any of the following languages? • C PHP • C++ • Java • Perl • Have you ever written an object-oriented program?

  3. Agenda for the course • PHP PHP • Web Application concepts and techniques • MU Libraries

  4. Presentation Library PHP

  5. Presentation Library PHP

  6. Presentation Library PHP

  7. Presentation Library PHP

  8. Presentation Library PHP

  9. Presentation Library PHP

  10. Authentication PHP

  11. Authentication check_authenticated_user( array('application_name' => $cfg_appname, 'session_name' => $cfg_sessionname, 'add_nav_func' => 'add_nav', PHP 'xslt_name' => $cfg_xslt, 'was_enabled' => 1, ));

  12. Why change? • Support • Stability • Compatibility PHP • Features • Cost

  13. What is a Web Application? • Goal: Dynamically generated HTML • Server-side PHP • Stateless

  14. What is PHP? • Personal Home Page Tools • PHP: Hypertext Preprocessor • 1995 - version 1.0 • Web application development environment PHP • similar to Cold Fusion, JSP , ASP , Web Objects, ... • Server-side • Open-Source • Free

  15. What is PHP? • Supported? • Zend • Internet • Can be embedded in HTML PHP • Compiled at run-time • C-derived syntax • similar to C, C++, Perl, Java, etc. • Object-oriented

  16. What can PHP do? • Platforms • Linux, FreeBSD, Sun Solaris, HP/UX, IBM AIX, MS Windows, Mac OS X, ... PHP • Apache, Microsoft IIS, Netscape/iPlanet, ... • Databases • Oracle, Sybase, DB2, MySQL, PostgreSQL, Ingres, dBase, ODBC, Adabas D, ...

  17. What can PHP do? • Output • HTML, XML (SAX and DOM), XSLT, PDF, GIF, JPG, PNG, Flash, ... • Protocols PHP • LDAP , IMAP , SNMP , NNTP , POP3, WDDX, SOAP , CORBA, IRC, FTP , SMTP , SSL, ... • E-commerce • Cybercash, CyberMUT, VeriSign Payflow Pro, CCVS, ...

  18. What can PHP do? • Encryption • Blowfish, Cast-256, CRC32, CRC32B, DES, Enigma, Gost, PHP HAVAL128, HAVAL160, HAVAL192, HAVAL224, HAVAL256, LOKI97, MD5, Panama, RC2, RC4, RC4-iv, Rijndael-128, Rijndael-192, Rijndael-256, RIPEMD160, Saferplus, Safer- sk64 xtea, Safer-sk128, Serpent, SHA1, SSL, Threeway, TIGER, TripleDES, Twofish, Wake

  19. Web Development Application Usage ASP 29,371,084 Perl 2,835,762 PHP JSP 2,543,689 WebObjects 1,503,133 PHP 18,748,190 Cold Fusion 10,478,951

  20. First Program <html> <head> <title>First Program</title> </head> <body> PHP <p> <?php print “My first PHP program.”; ?> </p> </body> </html>

  21. First Program 1. FTP to: admsol03.mcs.muohio.edu 2. Change directory to: /usr/local/www/share/htdocs/phpapps PHP 3. Create a new directory with your uniqueId. Change into that directory. 4. Save the program as: first.php 5. Try the program at: http://webdev.admin.muohio.edu/ phpapps/ uniqueId /first.php

  22. First Program <html> <head> <title>First Program</title> </head> <body> PHP <p> <?php print “My first PHP program.”; ?> </p> </body> </html>

  23. First Program <html> <head> <title>First Program</title> </head> <body> PHP <p> <?php print “My first PHP program.”; ?> </p> </body> </html>

  24. First Program <html> <head> <title>First Program</title> </head> <body> PHP <p> <?php print $_SERVER[”HTTP_USER_AGENT”]; ?> </p> </body> </html>

  25. First Program <html> <head> <title>First Program</title> </head> <body> PHP <p> <?php phpinfo(); ?> </p> </body> </html>

  26. Homework #1 Rewrite your first program using only PHP <?php PHP output all HTML here ?>

  27. References http://www.php.net/ http://www.users.muohio.edu/covertka/php/ PHP http://webdev.admin.muohio.edu/phpapps/ http://www.google.com/

Recommend


More recommend