SlideShare a Scribd company logo
1 of 51
Download to read offline
A PRESENTATION ON PHP  - BY MANISH BOTHRA
Agenda 1. Brief History of PHP 3. Examples 2. INSTALLATION
Brief History of PHP PHP   (PHP: Hypertext Preprocessor)   was created by Rasmus Lerdorf in 1994. It was initially developed for HTTP usage logging and server-side form generation in Unix.  PHP 2 (1995)  transformed the language into a Server-side embedded scripting language. Added database support, file uploads, variables, arrays, recursive functions, conditionals, iteration, regular expressions, etc. PHP 3 (1998)  added support for ODBC data sources, multiple platform support, email protocols (SNMP,IMAP), and new parser written by Zeev Suraski and Andi Gutmans .  PHP 4 (2000)  became an independent component of the web server for added efficiency. The parser was renamed the Zend Engine. Many security features were added. PHP 5 (2004)  adds Zend Engine II with object oriented programming, robust XML support using the libxml2 library, SOAP extension for interoperability with Web Services, SQLite has been bundled with PHP
Why is PHP used? Easy to Use Code is embedded into HTML.   The PHP code is enclosed in special start and end tags that allow you to jump into and out of &quot;PHP mode&quot;.   <html>    <head>        <title>Example</title>    </head>    <body>        <?php         echo &quot;Hi, I'm a PHP script!&quot;;         ?>     </body> </html>
Why is PHP used? Cross Platform   Runs on almost any Web server on several operating  system.   One of the strongest features is the wide range of  Supported database. Web Servers:  Apache, Microsoft IIS, Caudium, Netscape Enterprise Server  Operating Systems:  UNIX (HP-UX,OpenBSD,Solaris,Linux), Mac OSX, Windows NT/98/2000/XP/2003 Supported Databases:  Adabas D, dBase,Empress, FilePro  (read-only), Hyperwave,IBM DB2, Informix, Ingres,  InterBase,  FrontBase, mSQL, Direct MS-SQL, MySQL,  ODBC, Oracle (OCI7 and OCI8), Ovrimos, PostgreSQL, SQLite, Solid, Sybase, Velocis,Unix dbm
INSTALLATION
Installing PHP on Windows I ntroduction ,[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Choosing an Installation Method ,[object Object],[object Object],[object Object]
Installing PHP on Windows Choosing an Installation Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Choosing an Installation Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Choosing an Installation Method ,[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Windows InstallShield Installation (IIS) ,[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 1: Download the most recent installer and execute
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 2: Choose Standard or Advanced Installation
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 3: Choose an installation directory (c:hp)
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 4: SMTP settings
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 4: Error Settings (Display Everything)
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 5: Select your web server
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 6: Register file extensions (.php)
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 7: Web Server Configuration
Installing PHP on Windows Windows InstallShield Installation (IIS) Step 8: Testing index.php <?php phpinfo(); ?>
Installing PHP on Windows Windows Manual Installation (IIS) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Installing PHP on Windows Windows Manual Installation (IIS) Step 1: Download most recent distribution and unzip to Installation directory  (c:hp) Step 2: Copy php4ts.dll and contents of /dlls to the System Folder
Installing PHP on Windows Windows Manual Installation (IIS) Step 3: Copy php.ini-dist to %SROOT% and rename php.ini
Installing PHP on Windows Windows Manual Installation (IIS) Step 4: Edit php.ini Extensions directory. By default, extensions are kept in the  “ extensions” folder of the installation directory. extension_dir = c:hpxtensionsDocument Root. This is the local folder that your web server uses  as the web publishing root directory. doc_root = c:netpubwwroot For IIS installations you MUST turn off cgi.force_redirect cgi.force_redirect = 0
Installing PHP on Windows Windows Manual Installation (IIS) Step 5: Set file permissions The following files and folders must have “read” and “execute” permissions enabled for the system’s web user (I_USR_ hostname ) %SROOT%hp.ini C:hp
Installing PHP on Windows Windows Manual Installation (IIS) Step 6: Configure your web server Modify IIS configuration settings using the  Internet Services Manager  or  Internet Information services  tool in  Control Panel     Administrative Tools Right-click on the  server name   (IIS 5.0) or  Web Sites  (IIS 5.1) and select  Properties .
Installing PHP on Windows Windows Manual Installation (IIS) Step 6a: Edit Master Properties
Installing PHP on Windows ) Windows Manual Installation (IIS) Step 6b: Select  Configuration  under  Home Directory
Installing PHP on Windows Windows Manual Installation (IIS) Step 6c:  Add  an Application Mapping
Installing PHP on Windows Windows Manual Installation (IIS) Step 6d: Enter the name and path of the PHP executable.  Enter “.php” for the extension. Check “All Verbs” and  “ Script Engine”.  Repeat this process for all extensions you would like  your web server to parse as PHP. Note: Depending on your specific configuration, you may have  to enter “ %s %S” after the executable name. This may not be  necessary on all configurations.
Installing PHP on Windows Windows Manual Installation (IIS) Step 6e: Click “Select All” to apply settings to all web sites Under Inheritance Overrides. Click OK all the way back to the beginning.
Installing PHP on Windows Windows Manual Installation (IIS) Step 7: RESTART all web services. It doesn’t hurt to reboot Windows.
Installing PHP on Windows Windows Manual Installation (IIS) Step 8: Testing index.php <?php phpinfo(); ?>
EXAMPLES
Examples ,[object Object],[object Object]
Examples Step 1: Universal header and footer in a single file Create a file called header.php. This file will have all of the header HTML code. You can use FrontPage/Dreamweaver to create the header, but remember to remove the closing </BODY> and </HTML> tags. <html><head> <title>UCR Webmaster Support Group</title> <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=“mycssfile.css&quot;> </head> <body> <table width=80% height=30> <tr><td> <div align=center> Page Title </div> </td></tr></table>
Examples ,[object Object],[object Object],<table width=80% height=30> <tr><td> <div align=center> UC Riverside Department<BR>   <a href=mailto:someuser@ucr.edu>someuser@ucr.edu</a> </div> </td></tr></table>  </body> </html>
Examples ,[object Object],[object Object],<?php // header include(“header.php”); ?> Insert content here! <?php // footer include(“footer.php”); ?>
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],Page 1 Content Page 5 Content Page 3 Content Page 2 Content Page 4 Content Header Footer
Examples ,[object Object],[object Object],[object Object],[object Object]
Examples ,[object Object],[object Object],<?php $COUNTER_FILE = “webcounter.txt&quot;; if (file_exists($COUNTER_FILE)) { $fp = fopen(&quot;$COUNTER_FILE&quot;, &quot;r+&quot;); flock($fp, 1); $hits = fgets($fp, 4096); $hits += 1;  fseek($fp,0); fputs($fp, $hits); flock($fp, 3); fclose($fp); }  ?>
Examples Step 3: Simple Page Counter Next, output the counter value using PHP.  Copy this line after the main block of code. That’s it! The result should look something similar to: This page has been viewed   <?php echo“$hits”; ?>   times.
Examples ,[object Object],[object Object],This example shows How to escape from HTML and enter PHP mode How to output variables onto the screen using PHP <?php  echo“$hits”; ?>   visitors.
Examples ,[object Object],Echo  is the common method in outputting data. Since it  is a language construct, echo doesn’t require parenthesis like print(). Output Text Usage:  <?php  echo “Hello World”;   ?>  // prints out Hello World Output the value of a PHP variable: <?php  echo “$hits”;  ?>  // prints out the number of hits Echo has a shortcut syntax, but it only works with the “short  open tag” configuration enabled on the server.  <?=  $hits  ?>
Examples ,[object Object],Automatically generate the year on your pages. This will print out ©2004 UC Riverside.  © <?php  echo date(“Y”);  ?>   UC Riverside You will need to escape any quotation marks with a backslash. <?php   echo “I said She sells sea shells ”;  ?>
THANK YOU

More Related Content

What's hot (20)

Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php basics
Php basicsPhp basics
Php basics
 
PHP
PHPPHP
PHP
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
PHP variables
PHP  variablesPHP  variables
PHP variables
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginnersPHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginners
 
Php
PhpPhp
Php
 
Php array
Php arrayPhp array
Php array
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
 
Form Handling using PHP
Form Handling using PHPForm Handling using PHP
Form Handling using PHP
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
PHP Form Validation Technique
PHP Form Validation TechniquePHP Form Validation Technique
PHP Form Validation Technique
 
Php tutorial(w3schools)
Php tutorial(w3schools)Php tutorial(w3schools)
Php tutorial(w3schools)
 
Php Tutorials for Beginners
Php Tutorials for BeginnersPhp Tutorials for Beginners
Php Tutorials for Beginners
 
CSS
CSSCSS
CSS
 

Viewers also liked

Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorialalexjones89
 
Drupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalDrupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalBrian Hay
 
Loops PHP 04
Loops PHP 04Loops PHP 04
Loops PHP 04Spy Seat
 
PHP Summer Training Presentation
PHP Summer Training PresentationPHP Summer Training Presentation
PHP Summer Training PresentationNitesh Sharma
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 

Viewers also liked (8)

Php Ppt
Php PptPhp Ppt
Php Ppt
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
Drupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalDrupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with Drupal
 
Iso 12207
Iso 12207Iso 12207
Iso 12207
 
Loops PHP 04
Loops PHP 04Loops PHP 04
Loops PHP 04
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
PHP Summer Training Presentation
PHP Summer Training PresentationPHP Summer Training Presentation
PHP Summer Training Presentation
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 

Similar to Php Presentation

Similar to Php Presentation (20)

Wordpress on Windows
Wordpress on WindowsWordpress on Windows
Wordpress on Windows
 
Windows Loves drupal
Windows Loves drupalWindows Loves drupal
Windows Loves drupal
 
Windows Loves Drupal
Windows Loves DrupalWindows Loves Drupal
Windows Loves Drupal
 
Wordpress On Windows
Wordpress On WindowsWordpress On Windows
Wordpress On Windows
 
Install
InstallInstall
Install
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
 
PHP on Windows - What's New
PHP on Windows - What's NewPHP on Windows - What's New
PHP on Windows - What's New
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jao
 
Php On Windows
Php On WindowsPhp On Windows
Php On Windows
 
06.m3 cms set-upwebserver
06.m3 cms set-upwebserver06.m3 cms set-upwebserver
06.m3 cms set-upwebserver
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Lamp
LampLamp
Lamp
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
Asp introduction
Asp introductionAsp introduction
Asp introduction
 
Php
PhpPhp
Php
 
Php apache vs iis By Hafedh Yahmadi
Php apache vs iis  By Hafedh YahmadiPhp apache vs iis  By Hafedh Yahmadi
Php apache vs iis By Hafedh Yahmadi
 
Php myadmin
Php myadminPhp myadmin
Php myadmin
 
phpbenelux - Microsoft & PHP (Web Platform Installer, Bridges and Azure)
phpbenelux - Microsoft & PHP (Web Platform Installer, Bridges and Azure)phpbenelux - Microsoft & PHP (Web Platform Installer, Bridges and Azure)
phpbenelux - Microsoft & PHP (Web Platform Installer, Bridges and Azure)
 

Recently uploaded

LEAD5623 The Economics of Community Coll
LEAD5623 The Economics of Community CollLEAD5623 The Economics of Community Coll
LEAD5623 The Economics of Community CollDr. Bruce A. Johnson
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...Nguyen Thanh Tu Collection
 
Quantitative research methodology and survey design
Quantitative research methodology and survey designQuantitative research methodology and survey design
Quantitative research methodology and survey designBalelaBoru
 
PHARMACOGNOSY CHAPTER NO 5 CARMINATIVES AND G.pdf
PHARMACOGNOSY CHAPTER NO 5 CARMINATIVES AND G.pdfPHARMACOGNOSY CHAPTER NO 5 CARMINATIVES AND G.pdf
PHARMACOGNOSY CHAPTER NO 5 CARMINATIVES AND G.pdfSumit Tiwari
 
Plant Tissue culture., Plasticity, Totipotency, pptx
Plant Tissue culture., Plasticity, Totipotency, pptxPlant Tissue culture., Plasticity, Totipotency, pptx
Plant Tissue culture., Plasticity, Totipotency, pptxHimansu10
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
Dhavni Theory by Anandvardhana Indian Poetics
Dhavni Theory by Anandvardhana Indian PoeticsDhavni Theory by Anandvardhana Indian Poetics
Dhavni Theory by Anandvardhana Indian PoeticsDhatriParmar
 
Metabolism of lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
Metabolism of  lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptxMetabolism of  lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
Metabolism of lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptxDr. Santhosh Kumar. N
 
POST ENCEPHALITIS case study Jitendra bhargav
POST ENCEPHALITIS case study  Jitendra bhargavPOST ENCEPHALITIS case study  Jitendra bhargav
POST ENCEPHALITIS case study Jitendra bhargavJitendra Bhargav
 
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.docdieu18
 
3.12.24 Freedom Summer in Mississippi.pptx
3.12.24 Freedom Summer in Mississippi.pptx3.12.24 Freedom Summer in Mississippi.pptx
3.12.24 Freedom Summer in Mississippi.pptxmary850239
 
The First National K12 TUG March 6 2024.pdf
The First National K12 TUG March 6 2024.pdfThe First National K12 TUG March 6 2024.pdf
The First National K12 TUG March 6 2024.pdfdogden2
 
3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptxmary850239
 
Riti theory by Vamana Indian poetics.pptx
Riti theory by Vamana Indian poetics.pptxRiti theory by Vamana Indian poetics.pptx
Riti theory by Vamana Indian poetics.pptxDhatriParmar
 
ICS2208 Lecture4 Intelligent Interface Agents.pdf
ICS2208 Lecture4 Intelligent Interface Agents.pdfICS2208 Lecture4 Intelligent Interface Agents.pdf
ICS2208 Lecture4 Intelligent Interface Agents.pdfVanessa Camilleri
 
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...Nguyen Thanh Tu Collection
 
LEAD6001 - Introduction to Advanced Stud
LEAD6001 - Introduction to Advanced StudLEAD6001 - Introduction to Advanced Stud
LEAD6001 - Introduction to Advanced StudDr. Bruce A. Johnson
 
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...Marlene Maheu
 
Awards Presentation 2024 - March 12 2024
Awards Presentation 2024 - March 12 2024Awards Presentation 2024 - March 12 2024
Awards Presentation 2024 - March 12 2024bsellato
 

Recently uploaded (20)

LEAD5623 The Economics of Community Coll
LEAD5623 The Economics of Community CollLEAD5623 The Economics of Community Coll
LEAD5623 The Economics of Community Coll
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
 
Quantitative research methodology and survey design
Quantitative research methodology and survey designQuantitative research methodology and survey design
Quantitative research methodology and survey design
 
PHARMACOGNOSY CHAPTER NO 5 CARMINATIVES AND G.pdf
PHARMACOGNOSY CHAPTER NO 5 CARMINATIVES AND G.pdfPHARMACOGNOSY CHAPTER NO 5 CARMINATIVES AND G.pdf
PHARMACOGNOSY CHAPTER NO 5 CARMINATIVES AND G.pdf
 
Plant Tissue culture., Plasticity, Totipotency, pptx
Plant Tissue culture., Plasticity, Totipotency, pptxPlant Tissue culture., Plasticity, Totipotency, pptx
Plant Tissue culture., Plasticity, Totipotency, pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
Problems on Mean,Mode,Median Standard Deviation
Problems on Mean,Mode,Median Standard DeviationProblems on Mean,Mode,Median Standard Deviation
Problems on Mean,Mode,Median Standard Deviation
 
Dhavni Theory by Anandvardhana Indian Poetics
Dhavni Theory by Anandvardhana Indian PoeticsDhavni Theory by Anandvardhana Indian Poetics
Dhavni Theory by Anandvardhana Indian Poetics
 
Metabolism of lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
Metabolism of  lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptxMetabolism of  lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
Metabolism of lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
 
POST ENCEPHALITIS case study Jitendra bhargav
POST ENCEPHALITIS case study  Jitendra bhargavPOST ENCEPHALITIS case study  Jitendra bhargav
POST ENCEPHALITIS case study Jitendra bhargav
 
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
30-de-thi-vao-lop-10-mon-tieng-anh-co-dap-an.doc
 
3.12.24 Freedom Summer in Mississippi.pptx
3.12.24 Freedom Summer in Mississippi.pptx3.12.24 Freedom Summer in Mississippi.pptx
3.12.24 Freedom Summer in Mississippi.pptx
 
The First National K12 TUG March 6 2024.pdf
The First National K12 TUG March 6 2024.pdfThe First National K12 TUG March 6 2024.pdf
The First National K12 TUG March 6 2024.pdf
 
3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx
 
Riti theory by Vamana Indian poetics.pptx
Riti theory by Vamana Indian poetics.pptxRiti theory by Vamana Indian poetics.pptx
Riti theory by Vamana Indian poetics.pptx
 
ICS2208 Lecture4 Intelligent Interface Agents.pdf
ICS2208 Lecture4 Intelligent Interface Agents.pdfICS2208 Lecture4 Intelligent Interface Agents.pdf
ICS2208 Lecture4 Intelligent Interface Agents.pdf
 
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
 
LEAD6001 - Introduction to Advanced Stud
LEAD6001 - Introduction to Advanced StudLEAD6001 - Introduction to Advanced Stud
LEAD6001 - Introduction to Advanced Stud
 
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
 
Awards Presentation 2024 - March 12 2024
Awards Presentation 2024 - March 12 2024Awards Presentation 2024 - March 12 2024
Awards Presentation 2024 - March 12 2024
 

Php Presentation

  • 1. A PRESENTATION ON PHP - BY MANISH BOTHRA
  • 2. Agenda 1. Brief History of PHP 3. Examples 2. INSTALLATION
  • 3. Brief History of PHP PHP (PHP: Hypertext Preprocessor) was created by Rasmus Lerdorf in 1994. It was initially developed for HTTP usage logging and server-side form generation in Unix. PHP 2 (1995) transformed the language into a Server-side embedded scripting language. Added database support, file uploads, variables, arrays, recursive functions, conditionals, iteration, regular expressions, etc. PHP 3 (1998) added support for ODBC data sources, multiple platform support, email protocols (SNMP,IMAP), and new parser written by Zeev Suraski and Andi Gutmans . PHP 4 (2000) became an independent component of the web server for added efficiency. The parser was renamed the Zend Engine. Many security features were added. PHP 5 (2004) adds Zend Engine II with object oriented programming, robust XML support using the libxml2 library, SOAP extension for interoperability with Web Services, SQLite has been bundled with PHP
  • 4. Why is PHP used? Easy to Use Code is embedded into HTML. The PHP code is enclosed in special start and end tags that allow you to jump into and out of &quot;PHP mode&quot;. <html>    <head>        <title>Example</title>    </head>    <body>        <?php        echo &quot;Hi, I'm a PHP script!&quot;;        ?>     </body> </html>
  • 5. Why is PHP used? Cross Platform Runs on almost any Web server on several operating system. One of the strongest features is the wide range of Supported database. Web Servers: Apache, Microsoft IIS, Caudium, Netscape Enterprise Server Operating Systems: UNIX (HP-UX,OpenBSD,Solaris,Linux), Mac OSX, Windows NT/98/2000/XP/2003 Supported Databases: Adabas D, dBase,Empress, FilePro (read-only), Hyperwave,IBM DB2, Informix, Ingres, InterBase, FrontBase, mSQL, Direct MS-SQL, MySQL, ODBC, Oracle (OCI7 and OCI8), Ovrimos, PostgreSQL, SQLite, Solid, Sybase, Velocis,Unix dbm
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 1: Download the most recent installer and execute
  • 18. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 2: Choose Standard or Advanced Installation
  • 19. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 3: Choose an installation directory (c:hp)
  • 20. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 4: SMTP settings
  • 21. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 4: Error Settings (Display Everything)
  • 22. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 5: Select your web server
  • 23. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 6: Register file extensions (.php)
  • 24. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 7: Web Server Configuration
  • 25. Installing PHP on Windows Windows InstallShield Installation (IIS) Step 8: Testing index.php <?php phpinfo(); ?>
  • 26.
  • 27. Installing PHP on Windows Windows Manual Installation (IIS) Step 1: Download most recent distribution and unzip to Installation directory (c:hp) Step 2: Copy php4ts.dll and contents of /dlls to the System Folder
  • 28. Installing PHP on Windows Windows Manual Installation (IIS) Step 3: Copy php.ini-dist to %SROOT% and rename php.ini
  • 29. Installing PHP on Windows Windows Manual Installation (IIS) Step 4: Edit php.ini Extensions directory. By default, extensions are kept in the “ extensions” folder of the installation directory. extension_dir = c:hpxtensionsDocument Root. This is the local folder that your web server uses as the web publishing root directory. doc_root = c:netpubwwroot For IIS installations you MUST turn off cgi.force_redirect cgi.force_redirect = 0
  • 30. Installing PHP on Windows Windows Manual Installation (IIS) Step 5: Set file permissions The following files and folders must have “read” and “execute” permissions enabled for the system’s web user (I_USR_ hostname ) %SROOT%hp.ini C:hp
  • 31. Installing PHP on Windows Windows Manual Installation (IIS) Step 6: Configure your web server Modify IIS configuration settings using the Internet Services Manager or Internet Information services tool in Control Panel  Administrative Tools Right-click on the server name (IIS 5.0) or Web Sites (IIS 5.1) and select Properties .
  • 32. Installing PHP on Windows Windows Manual Installation (IIS) Step 6a: Edit Master Properties
  • 33. Installing PHP on Windows ) Windows Manual Installation (IIS) Step 6b: Select Configuration under Home Directory
  • 34. Installing PHP on Windows Windows Manual Installation (IIS) Step 6c: Add an Application Mapping
  • 35. Installing PHP on Windows Windows Manual Installation (IIS) Step 6d: Enter the name and path of the PHP executable. Enter “.php” for the extension. Check “All Verbs” and “ Script Engine”. Repeat this process for all extensions you would like your web server to parse as PHP. Note: Depending on your specific configuration, you may have to enter “ %s %S” after the executable name. This may not be necessary on all configurations.
  • 36. Installing PHP on Windows Windows Manual Installation (IIS) Step 6e: Click “Select All” to apply settings to all web sites Under Inheritance Overrides. Click OK all the way back to the beginning.
  • 37. Installing PHP on Windows Windows Manual Installation (IIS) Step 7: RESTART all web services. It doesn’t hurt to reboot Windows.
  • 38. Installing PHP on Windows Windows Manual Installation (IIS) Step 8: Testing index.php <?php phpinfo(); ?>
  • 40.
  • 41. Examples Step 1: Universal header and footer in a single file Create a file called header.php. This file will have all of the header HTML code. You can use FrontPage/Dreamweaver to create the header, but remember to remove the closing </BODY> and </HTML> tags. <html><head> <title>UCR Webmaster Support Group</title> <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=“mycssfile.css&quot;> </head> <body> <table width=80% height=30> <tr><td> <div align=center> Page Title </div> </td></tr></table>
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47. Examples Step 3: Simple Page Counter Next, output the counter value using PHP. Copy this line after the main block of code. That’s it! The result should look something similar to: This page has been viewed <?php echo“$hits”; ?> times.
  • 48.
  • 49.
  • 50.