13-10-2012, 11:03 AM
PHP Introduction
php_notes.ppt (Size: 707 KB / Downloads: 40)
Open Source
Open source is a development method for software that harnesses the power of distributed peer review and transparency of process. The promise of open source is better quality, higher reliability, more flexibility, lower cost, and an end to predatory vendor lock-in.
Programmers on the Internet can read, redistribute, and modify the source for a piece of software, it evolves
People improve it, people adapt it, people fix bugs. And this can happen at a speed that, compared to conventional software development, seems astonishing
What is PHP?
PHP == ‘Hypertext Preprocessor’. It was also called 'Personal Home Page' origionally.
Open-source, server-side scripting language
Used to generate dynamic web-pages
PHP scripts reside between reserved PHP tags
This allows the programmer to embed PHP scripts within HTML pages
Interpreted language, scripts are parsed at run-time rather than compiled beforehand
Executed on the server-side
Source-code not visible by client
‘View Source’ in browsers does not display the PHP code
Various built-in functions allow for fast development
Compatible with many popular databases
History of PHP
PHP began in 1995 when Rasmus Lerdorf developed a Perl/CGI script toolset he called the Personal Home Page or PHP
PHP 2 released 1997 (PHP now stands for Hypertex Processor). Lerdorf developed it further, using C instead
PHP3 released in 1998 (50,000 users)
PHP4 released in 2000 (3.6 million domains). Considered debut of functional language and including Perl parsing, with other major features
PHP5.0.0 released July 13, 2004 (113 libraries>1,000 functions with extensive object-oriented programming)
PHP5.0.5 released Sept. 6, 2005 for maintenance and bug fixes
Recommended Texts for Learning PHP
PHP Manual www.php.net
Larry Ullman’s books from the Visual Quickpro series
PHP & MySQL for Dummies
Beginning PHP 5 and MySQL: From Novice to Professional by W. Jason Gilmore
(This is more advanced and dense than the others, but great to read once you’ve finished the easier books. One of the best definition/description of object oriented programming I’ve read)
Features of PHP
PHP stands for “Hypertext Preprocessor“. It is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
It is an interpreted language.
There are three main fields where PHP scripts are used:
1. Server side scripting
2. Command line scripting.
3. Writing client-side GUI applications. For this PHP-GTK is used. PHP-GTK is an extension for the PHP programming language that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client-side cross-platform GUI applications.
Echo
The PHP command ‘echo’ is used to output the parameters passed to it
The typical usage for this is to send data to the client’s web-browser
Syntax
void echo (string arg1 [, string argn...])
In practice, arguments are not passed in parentheses since echo is a language construct rather than an actual function
Including common file content
The include() and require() statements includes and evaluates the specified file.
But if included file is not found, then require() will result into fatal error and further execution will stop. Where as include() will just raise a warning and further execution will continue.
require_once() and include_once()
should be used in cases where the same file might be included and evaluated more than once during a particular execution of a script, and you want to be sure that it is included exactly once to avoid problems with function redefinitions, variable value reassignments, etc.
Arrays
PHP arrays are associative arrays because they associates keys with values.
You can use it either as a simple c like array or as an associative array.
Here array indices are enclosed into [ ]
Rather than having a fixed number of slots, php creates array slots as new elements are added to the array.
You can assign any type for keys and values .such as string, float ,integer etc.
php_notes.ppt (Size: 707 KB / Downloads: 40)
Open Source
Open source is a development method for software that harnesses the power of distributed peer review and transparency of process. The promise of open source is better quality, higher reliability, more flexibility, lower cost, and an end to predatory vendor lock-in.
Programmers on the Internet can read, redistribute, and modify the source for a piece of software, it evolves
People improve it, people adapt it, people fix bugs. And this can happen at a speed that, compared to conventional software development, seems astonishing
What is PHP?
PHP == ‘Hypertext Preprocessor’. It was also called 'Personal Home Page' origionally.
Open-source, server-side scripting language
Used to generate dynamic web-pages
PHP scripts reside between reserved PHP tags
This allows the programmer to embed PHP scripts within HTML pages
Interpreted language, scripts are parsed at run-time rather than compiled beforehand
Executed on the server-side
Source-code not visible by client
‘View Source’ in browsers does not display the PHP code
Various built-in functions allow for fast development
Compatible with many popular databases
History of PHP
PHP began in 1995 when Rasmus Lerdorf developed a Perl/CGI script toolset he called the Personal Home Page or PHP
PHP 2 released 1997 (PHP now stands for Hypertex Processor). Lerdorf developed it further, using C instead
PHP3 released in 1998 (50,000 users)
PHP4 released in 2000 (3.6 million domains). Considered debut of functional language and including Perl parsing, with other major features
PHP5.0.0 released July 13, 2004 (113 libraries>1,000 functions with extensive object-oriented programming)
PHP5.0.5 released Sept. 6, 2005 for maintenance and bug fixes
Recommended Texts for Learning PHP
PHP Manual www.php.net
Larry Ullman’s books from the Visual Quickpro series
PHP & MySQL for Dummies
Beginning PHP 5 and MySQL: From Novice to Professional by W. Jason Gilmore
(This is more advanced and dense than the others, but great to read once you’ve finished the easier books. One of the best definition/description of object oriented programming I’ve read)
Features of PHP
PHP stands for “Hypertext Preprocessor“. It is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
It is an interpreted language.
There are three main fields where PHP scripts are used:
1. Server side scripting
2. Command line scripting.
3. Writing client-side GUI applications. For this PHP-GTK is used. PHP-GTK is an extension for the PHP programming language that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client-side cross-platform GUI applications.
Echo
The PHP command ‘echo’ is used to output the parameters passed to it
The typical usage for this is to send data to the client’s web-browser
Syntax
void echo (string arg1 [, string argn...])
In practice, arguments are not passed in parentheses since echo is a language construct rather than an actual function
Including common file content
The include() and require() statements includes and evaluates the specified file.
But if included file is not found, then require() will result into fatal error and further execution will stop. Where as include() will just raise a warning and further execution will continue.
require_once() and include_once()
should be used in cases where the same file might be included and evaluated more than once during a particular execution of a script, and you want to be sure that it is included exactly once to avoid problems with function redefinitions, variable value reassignments, etc.
Arrays
PHP arrays are associative arrays because they associates keys with values.
You can use it either as a simple c like array or as an associative array.
Here array indices are enclosed into [ ]
Rather than having a fixed number of slots, php creates array slots as new elements are added to the array.
You can assign any type for keys and values .such as string, float ,integer etc.