Learn PHP in 7 Days
PHP (PHP: Hypertext Preprocessor) is a computer scripting
language, designed for producing dynamic
web pages. It is mainly used in server-side scripting, butyou can be used from
a command line interface or in standalone graphical applications.
In 1994 PHP was created, the main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification.
PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. It generally runs on a web server, taking PHP code as its input and creating web pages as output. It can be deployed on most web servers and on almost every operating system and platform free of charge.
Use of php- PHP is a general-purpose scripting language that is especially suited for web development. It is the fourth most popular computer programming language, ranking behind Java, C, and Visual Basic. It can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers, many operating systems and platforms, and can be used with many relational database management systems. It is available free of charge, and the PHP Group provides the complete source code for users to build, customize and extend for their own use.
PHP primarily acts as a filter, taking input from a file or stream containing text and/or PHP instructions and outputs another stream of data; most commonly the output will be HTML. From PHP 4, the PHP parser compiles input to produce bytecode for processing by the Zend Engine, giving improved performance over its interpreter predecessor. Originally designed to create dynamic web pages, PHP's principal focus is server-side scripting, and it is similar to other server-side scripting languages that provide dynamic content from a web server to a client, such as Microsoft's ASP.NET system, Sun Microsystems' JavaServer Pages[26], and mod_perl. PHP has also attracted the development of many frameworks that provide building blocks and a design structure to promote rapid application development (RAD). Some of these include CakePHP, PRADO, Symfony and Zend Framework, offering features similar to other web application frameworks
The LAMP architecture has become popular in the web industry as a way of deploying web applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and MySQL, although the P can also refer to Python or Perl.
As of April 2007, over 20 million Internet domains were hosted on servers with PHP installed, and PHP was recorded as the most popular Apache module.
You can increase the memory limit with a php.ini file in the same directory as your php script. If you have multiple subdirectories, you will need to place the php.ini file in each subdirectory that has php scripts.
Security
PHP is a popular target of hackers who exploit vulnerable applications written in PHP. Software vulnerabilities related to PHP are identified among the CVE records, available from the National Vulnerability Database. The proportion of vulnerabilities related to PHP, out of the total of all common vulnerabilities, amounted to: 12% in 2003, 20% in 2004, 28% in 2005, 43% in 2006, 36% in 2007, and 38% for the first two months of 2008. More than a quarter of all software vulnerabilities listed in this database are related to PHP, and more than a third of vulnerabilities listed recently. Most of these vulnerabilities can be exploited remotely, that is without being logged on the computer hosting the vulnerable application.[27] Such exploitation is made possible due to poor programming habits, such as failing to check data before entering it into a database, and deprecated features of the language, such as register_globals, which converts variables created by anyone to local variables and can result in code injection, cross-site scripting and other application security issues.
In 1994 PHP was created, the main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification.
PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. It generally runs on a web server, taking PHP code as its input and creating web pages as output. It can be deployed on most web servers and on almost every operating system and platform free of charge.
Use of php- PHP is a general-purpose scripting language that is especially suited for web development. It is the fourth most popular computer programming language, ranking behind Java, C, and Visual Basic. It can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers, many operating systems and platforms, and can be used with many relational database management systems. It is available free of charge, and the PHP Group provides the complete source code for users to build, customize and extend for their own use.
PHP primarily acts as a filter, taking input from a file or stream containing text and/or PHP instructions and outputs another stream of data; most commonly the output will be HTML. From PHP 4, the PHP parser compiles input to produce bytecode for processing by the Zend Engine, giving improved performance over its interpreter predecessor. Originally designed to create dynamic web pages, PHP's principal focus is server-side scripting, and it is similar to other server-side scripting languages that provide dynamic content from a web server to a client, such as Microsoft's ASP.NET system, Sun Microsystems' JavaServer Pages[26], and mod_perl. PHP has also attracted the development of many frameworks that provide building blocks and a design structure to promote rapid application development (RAD). Some of these include CakePHP, PRADO, Symfony and Zend Framework, offering features similar to other web application frameworks
The LAMP architecture has become popular in the web industry as a way of deploying web applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and MySQL, although the P can also refer to Python or Perl.
As of April 2007, over 20 million Internet domains were hosted on servers with PHP installed, and PHP was recorded as the most popular Apache module.
You can increase the memory limit with a php.ini file in the same directory as your php script. If you have multiple subdirectories, you will need to place the php.ini file in each subdirectory that has php scripts.
Security
PHP is a popular target of hackers who exploit vulnerable applications written in PHP. Software vulnerabilities related to PHP are identified among the CVE records, available from the National Vulnerability Database. The proportion of vulnerabilities related to PHP, out of the total of all common vulnerabilities, amounted to: 12% in 2003, 20% in 2004, 28% in 2005, 43% in 2006, 36% in 2007, and 38% for the first two months of 2008. More than a quarter of all software vulnerabilities listed in this database are related to PHP, and more than a third of vulnerabilities listed recently. Most of these vulnerabilities can be exploited remotely, that is without being logged on the computer hosting the vulnerable application.[27] Such exploitation is made possible due to poor programming habits, such as failing to check data before entering it into a database, and deprecated features of the language, such as register_globals, which converts variables created by anyone to local variables and can result in code injection, cross-site scripting and other application security issues.
|