Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

Published in: Technology
  • Be the first to comment


  1. 1. PHP <ul><li>PHP sstands for Hypertext Preprocessor. Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is processed by an interpreter application in command-line mode performing desired operating system operations and producing program output on its standard output channel. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as standalone interpreter on most operating systems and computing platforms. </li></ul>
  2. 2. HISTORY OF PHP <ul><li>PHP originally stood for personal home page.It began in 1994 as a set of Common Gateway Interface (CGI) binaries written in the C programming language by the Danish/ Greenlandic programmer Rasmus Lerdorf.Lerdorf initially created these Personal HomePage Tools to replace a small set of Perl scripts he had been using to maintain his personal homepage. PHP stands for PHP: Hypertext Preprocessor, with that PHP standing for Personal HomePage/Form Interpreter . This type of acronym is known as a retronym. Originally, in 1994, the language was designed as a small set of binaries used to collect some basic site traffic data. In 1997 the parser was rewritten by two Israelis and the name was changed to the current acronym — it being determined that hypertext preprocessor was a decidedly more acceptable name in the business world. </li></ul>
  3. 3. <ul><li>PHP is an open-source language, used primarily for dynamic web content and server-side applications. It is often pointed to as the main competitor with: </li></ul><ul><li>• Microsoft's C# - Visual Basic.NET - ASP family, </li></ul><ul><li>• Sun's Java - JSP </li></ul><ul><li>• Macromedia's ColdFusion </li></ul><ul><li>• CGI - Perl </li></ul><ul><li>PHP has many open-source libraries included with the core build, and many more are readily available. Extensions exist to help PHP interface with a number of systems, including IRC, a number of compression formats, and Windows API. Other extensions exist to let PHP generate file formats on-the-fly, such as a popular extension which allows PHP to create Macromedia Flash movies. </li></ul><ul><li>Since version 3, PHP has integrated object oriented features. Version 5 built substantially on this limited functionality, and PHP now has robust object oriented capabilities,including interfaces, exceptions, destructions, and abstracts.PHP reached wide-spread popularity with version 4, released in 2000. In 2004 PHP 5 was debuted, and it is now considered one the top languages used for server-side scripting. </li></ul>
  4. 4. PHP FILE <ul><li>* PHP files can contain text, HTML tags and scripts. </li></ul><ul><li>* PHP files are returned to the browser as plain </li></ul><ul><li>HTML . </li></ul><ul><li>* PHP files have a file extension of &quot;.php&quot;, </li></ul><ul><li>&quot;.php3&quot;, or &quot;.phtml&quot; </li></ul>
  5. 5. INSTALLATION OF PHP <ul><li>PHP's initialization file, generally called php.ini, is responsible for configuring many of the aspects of PHP's behavior. PHP attempts to find and load this configuration from a number of locations. The following is a summary of its search order: </li></ul><ul><li>1. SAPI module specific location. </li></ul><ul><li>2. The PHPRC environment variable. (As of PHP 5.2.0) </li></ul><ul><li>3. A number of predefined registry keys on Windows (As of PHP 5.2.0) </li></ul><ul><li>4. Current working directory (except CLI) </li></ul><ul><li>5. The web server's directory (for SAPI modules), or directory of PHP </li></ul><ul><li>(otherwise in Windows) </li></ul><ul><li>6. The directory from the --with-config-file-path compile time option, or the Windows directory (C:windows or C:winnt) </li></ul>
  6. 6. <ul><li>Expressions in the INI file are limited to bitwise operators and parentheses: </li></ul><ul><li>| bitwise OR </li></ul><ul><li>^ bitwise XOR </li></ul><ul><li>& bitwise AND </li></ul><ul><li>~ bitwise NOT </li></ul><ul><li>! boolean NOT </li></ul>
  7. 7. CONFIGURATION FILE <ul><li>The configuration file (php.ini) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI version, it happens on every invocation. </li></ul><ul><li>php.ini is searched in these locations (in order): </li></ul><ul><li>* SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD) </li></ul><ul><li>* The PHPRC environment variable. Before PHP 5.2.0 this was checked after the registry key mentioned below. </li></ul><ul><li>* As of PHP 5.2.0, the location of the php.ini file can be set for different versions of PHP. The following registry keys are examined in order: [HKEY_LOCAL_MACHINESOFTWAREPHPx.y.z], [HKEY_LOCAL_MACHINESOFTWAREPHPx.y] and [HKEY_LOCAL_MACHINESOFTWAREPHPx], where x, y and z mean the PHP major, minor and release versions. If there is a value for IniFilePath in these keys, then the first one found will be used as the location of the php.ini (Windows only). </li></ul><ul><li>* [HKEY_LOCAL_MACHINESOFTWAREPHP], value of IniFilePath (Windows only). </li></ul><ul><li>* Current working directory (except CLI) </li></ul><ul><li>* The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows) </li></ul>