1 / 14

PHP CSCE 330 February 6, 2003 Group Members : Antwan B. Phan George Hwang Luat Vu

Programming Language Presentation. PHP CSCE 330 February 6, 2003 Group Members : Antwan B. Phan George Hwang Luat Vu. Contents. What is PHP? What does it do? How does it work? Comparison of languages Advantages and Disadvantages Samples of Code Conclusion

london
Download Presentation

PHP CSCE 330 February 6, 2003 Group Members : Antwan B. Phan George Hwang Luat Vu

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. Programming Language Presentation • PHP • CSCE 330 • February 6, 2003 • Group Members: Antwan B. Phan • George Hwang • Luat Vu

  2. Contents • What is PHP? • What does it do? • How does it work? • Comparison of languages • Advantages and Disadvantages • Samples of Code • Conclusion • References & Resources

  3. What is PHP? • PHP stands for Personal Home Pages Hypertext Processor. • PHP is a server-side, cross-platform, HTML embedded scripting language. • Was designed in 1995 by Rasmus Lerdorf because it needs a free tools to program Web pages.

  4. What is PHP? • A fast, powerful and mature web-based server-side programming language. • Allows the creation of dynamic web pages for powerful web sites and web based applications.

  5. What does it do? • An Internet tool. It is usable for processing large data on server-side and build an html page that display the results. • Allows tight integration with a number of database systems including including Informix, Microsoft SQL Server, mSQL, MySQL, ODBC, Oracle and Sybase • Used in conjunction with a relational database system, like MySQL, large sets of data can be handled with speed and flexibility.

  6. How does it work? • A PHP scripts produces web pages, and may be embedded inside html code. • Combines elements of functional and imperative languages Interpreter: take source code and directly execute it. Compiler: convert source code into executable code that can be run at a later time

  7. How does it work? • Similar to C, but adds dynamic variables. • Serves as a "wrapper" for many standard C libraries. • A server must be configured to execute the interpreter on pages with .php extensions, and send resulting html pages on the network.

  8. Comparison of Languages • PHP draws its strengths from a highly flexible language derived from C/C++ and its predecessor, PERL. • Perl syntax is very different from PHP, which is more formal with its C influenced procedure-based syntax. • In comparison with Perl, PHP gains some on the readability side, but loses a lot on the convenience side.

  9. Advantages • PHP is a powerful language providing fast development time. • There is a large amount of Open Source code written in PHP meaning affordable and speedy development of new applications. • Since it uses similar syntax and constructs, knowledge of PHP can help you in learning the C language.

  10. Disadvantages • In order for a database to run correctly, the PHP code must be changed to suit the desired database. • A disadvantage is actually created by writers of PHP scripts who inadvertently create a bug through which hackers can exploit. • Cookies don't work.

  11. Samples of Code <html> <head> <title>Example</title> </head> <body> Start Tag: <?php echo "Hi, I'm a PHPscript!";?>:End Tag</body> </html>

  12. Samples of Code • Code to Open and Query a database in PHP <?php $sql = "SELECT * FROM queryitems"; //creates variable ($sql), sets equal to string mysql_connect(); //connects to MySQL engine $rs = mysql_db_query("Websitedb",$sql); //creates record set which contains the results of the //query ?>

  13. Conclusion • PHP is a server-side scripting language that facilitates the creation of dynamic Web pages by embedding PHP-coded logic in HTML documents. • PHP can easily be self-taught and easily be programmed for everyday use. • PHP combines many of the finest features of Perl, C, and Java, and adds its own elements to the concoction to give Web programmers great flexibility and power in designing and implementing dynamic, content-oriented Web pages.

  14. References & Resources • http://www.scriptol.org/php.html • http://www.phphelp.com/article/1p1.php • http://www.gnuworld.com/php • http://marty.anstey.ca/programming/

More Related