Presentation is loading. Please wait.

Presentation is loading. Please wait.

What is PHP? PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used Open Source general- purpose scripting language that is especially.

Similar presentations


Presentation on theme: "What is PHP? PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used Open Source general- purpose scripting language that is especially."— Presentation transcript:

1 What is PHP? PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used Open Source general- purpose scripting language that is especially suited for Web development and can be embedded into HTML.

2 What can PHP do? Server-side Scripting: This is the most traditional and main target field for PHP. You need three things to make this work: 1.The PHP parser (CGI or server module) 2.A web browser 3.A webserver with a connected PHP installation. All these can run on your home machine if you are just experimenting with PHP programming.

3 What can PHP do? Command Line Scripting: You can make a PHP script to run it without any server or browser. You only need the PHP parser to use it this way. This type of usage is ideal for scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows). These scripts can also be used for simple text processing tasks.

4 What can PHP do? Desktop Applications: Writing desktop applications. PHP is probably not the very best language to create a desktop application with a graphical user interface, but if you know PHP very well, and would like to use some advanced PHP features in your client-side applications you can also use PHP- GTK to write such programs. You also have the ability to write cross- platform applications this way.

5 Database Strength: Adabas DInterBasePostgreSQL dBaseFrontBaseSQLite EmpressmSQLSolid FilePro (read-only)Direct MS-SQLSybase HyperwaveMySQLVelocis IBM DB2ODBCUnix dbm InformixOracle (OCI7 and OCI8) IngresOvrimos

6 Ubiquitous Setups: - Most commonly used with Apache Web Server as module - Most commonly used with MySQL Database Server - Most commonly used on the Linux platform Additional Common Setups: - Growing number of installations on Windows machines - Local development setups are popular

7 19/562,759 Domains, 1,305,799 IP Addresses

8 Simple Web Page Example: helloworld.php Example

9 The Guts Variables: - variables are given a value at declaration but not a type $foo = 0; - always preceded by the dollar sign: $ - vars can be converted to common specific types (int, variant, etc.) - typical scope rules apply, but global command may be used for public or global variables

10 The Guts Functions: - typically declared in “global” files that are included by all your other website pages -> keep them in one place - optionally with arguments and can return values <?php function fooFunction($arg1, $arg2 = '') { if (condition) { statement; } return $val; } ?>

11 The Guts Classes: - more forgiving than in C++, VB, C# or similar approaches - excellent way to encapsulate and control code <?php class clsFoo { var $my_color = ‘green’; function clsFoo ($arg1) { $this->my_color = $arg1; } } ?>

12 Where to Start? - www.php.netwww.php.net - www.phpmyadmin.net (best free MySQL management tool)www.phpmyadmin.net - www.mysql.org (.com)www.mysql.org - www.apache.org (version 1.3.x recommended for a local install)www.apache.org - www.jtlnet.com (cheap php/mysql hosting – tons out there)www.jtlnet.com - www.phpbuilder.com (coding resource)www.phpbuilder.com - www.zend.com (Zend Studio 5.x – Visual Studio-type IDE)www.zend.com


Download ppt "What is PHP? PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used Open Source general- purpose scripting language that is especially."

Similar presentations


Ads by Google