Presentation is loading. Please wait.

Presentation is loading. Please wait.

PHP PHP: Hypertext Preprocessing Preston Brinks and Sean McKenzie.

Similar presentations


Presentation on theme: "PHP PHP: Hypertext Preprocessing Preston Brinks and Sean McKenzie."— Presentation transcript:

1 PHP PHP: Hypertext Preprocessing Preston Brinks and Sean McKenzie

2 What is PHP? PHP is a server-side scripting language designed specifically for the Web. PHP is a server-side scripting language designed specifically for the Web. An open source language An open source language PHP code can be embedded within an HTML page, which will be executed each time that page is visited. PHP code can be embedded within an HTML page, which will be executed each time that page is visited. Example code (all equivalent): Example code (all equivalent): Short Style: Short Style: XML Style: XML Style: Script Style: echo “Hello World!”; Script Style: echo “Hello World!”; ASP Style: ASP Style:

3 History of PHP Created by Rasmus Lerdorf in 1994 Created by Rasmus Lerdorf in 1994 Originally a set of Perl scripts used by Lerdorf to show off his résumé as well as collect information on his website, such as the site’s traffic info. Originally a set of Perl scripts used by Lerdorf to show off his résumé as well as collect information on his website, such as the site’s traffic info. Lerdorf later transcribed these Perl scripts into a set of CGI binaries written in C, and in doing so, combined it with his own Form Interpreter to create PHP/FI. Lerdorf later transcribed these Perl scripts into a set of CGI binaries written in C, and in doing so, combined it with his own Form Interpreter to create PHP/FI.

4 History of PHP PHP/FI grew in popularity, but did not become widely known until two program developers named Zeev Suraski and Andi Gutmans, developed a new parser in the summer of 1997, which led to the development of PHP 3.0. PHP/FI grew in popularity, but did not become widely known until two program developers named Zeev Suraski and Andi Gutmans, developed a new parser in the summer of 1997, which led to the development of PHP 3.0. The newest version out is PHP 5, which uses an engine developed by Suraski and Gutmans, known as the Zend II Engine. (Zend I was used by PHP 4) The newest version out is PHP 5, which uses an engine developed by Suraski and Gutmans, known as the Zend II Engine. (Zend I was used by PHP 4)

5 Features of PHP Very Efficient – Can serve millions of hits per day. Very Efficient – Can serve millions of hits per day. Database Integration – Supports many databases, such as mySQL and Oracle. Also has excellent XML support as of PHP 5. Database Integration – Supports many databases, such as mySQL and Oracle. Also has excellent XML support as of PHP 5. Built-in Libraries – Tailored to web development, one can connect to other network services, send email, work with cookies, generate PDF documents, and make GIF images on the fly all with a few lines of code. Built-in Libraries – Tailored to web development, one can connect to other network services, send email, work with cookies, generate PDF documents, and make GIF images on the fly all with a few lines of code. It’s Free – Available on http://www.php.net It’s Free – Available on http://www.php.net Easy to Learn – Very similar in syntax to C/C++/Java and Perl. Easy to Learn – Very similar in syntax to C/C++/Java and Perl. Portable – Works on Unix based operating systems, on Mac OS X, as well as on versions of Microsoft Windows. Your PHP code will often work without modification on a different system running PHP. Portable – Works on Unix based operating systems, on Mac OS X, as well as on versions of Microsoft Windows. Your PHP code will often work without modification on a different system running PHP.

6 Database Support The following is a list of supported databases in PHP 5: The following is a list of supported databases in PHP 5: Adabas D InterBase PostgreSQL dBase FrontBase SQLite Empress mSQL mSQL FilePro (read-only) Solid Direct MS-SQL SybaseHyperwaveMySQLVelocisODBC Unix dbm Informix Oracle (OCI7 and OCI8) IngresOvrimos IBM DB2

7 What is PHP Good For? It is great for complex web page designs It is great for complex web page designs E-commerce sites with heavy traffic (ex. Amazon) E-commerce sites with heavy traffic (ex. Amazon) Complex bulletin boards and forums (ex. phpBB) Complex bulletin boards and forums (ex. phpBB) Secure websites (ex. Novasis) Secure websites (ex. Novasis) Email web hosts (ex. Gmail) Working with and integrating XML into your webpage Working with and integrating XML into your webpage Database management and search (ex. theFaceBook) Database management and search (ex. theFaceBook)

8 Processing a PHP Page

9 An Example titleCreator.php titleCreator.php Uses a simple form with simple fields Uses a simple form with simple fields Asks a user for input, such as the title they want, what their name is, the background color, etc. Asks a user for input, such as the title they want, what their name is, the background color, etc. When submitted, the page is reloaded with the specified form values using PHP code to write out new HTML code When submitted, the page is reloaded with the specified form values using PHP code to write out new HTML code

10 titleCreator.php

11 Useful Links Official Website ( http://www.php.net/ ) Official Website ( http://www.php.net/ ) PHP Online Manual ( http://us2.php.net/manual/en/ ) PHP Online Manual ( http://us2.php.net/manual/en/ ) Installation on Windows Systems ( http://us2.php.net/manual/en/install.windows.php ) Installation on Windows Systems ( http://us2.php.net/manual/en/install.windows.php ) Using Apache with Windows ( http://httpd.apache.org/docs/2.0/platform/windows.html ) Using Apache with Windows ( http://httpd.apache.org/docs/2.0/platform/windows.html ) Alternative Installation Guide ( http://www.webmasterstop.com/86.html ) Alternative Installation Guide ( http://www.webmasterstop.com/86.html )


Download ppt "PHP PHP: Hypertext Preprocessing Preston Brinks and Sean McKenzie."

Similar presentations


Ads by Google