1 / 18

Introduction to & Overview of PHP

Introduction to & Overview of PHP. Instructor: Joseph DiVerdi, Ph.D., MBA. PHP In Brief. PHP Is A Server-Side HTML-Embedded Cross-Platform Programming Language Provides a Means for Developers to Put Instructions in HTML Files to Create Dynamic Content. Explanations. Server-Side

allen-johns
Download Presentation

Introduction to & Overview of PHP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to & Overview of PHP Instructor: Joseph DiVerdi, Ph.D., MBA

  2. PHP In Brief • PHP Is A • Server-Side • HTML-Embedded • Cross-Platform • Programming Language • Provides a Means for Developers to Put Instructions in HTML Files to Create Dynamic Content

  3. Explanations • Server-Side • PHP Code is Executed on the Server • HTML-Embedded • PHP Code is Inserted Directly in HTML • Cross-Platform • PHP Runs on Several Different (Server) OSes • Scripting Language • Difference Between Scripting & Programming Languages is Increasingly Small • More Semantic than Significant • Script is Not Compiled

  4. PHP in Less Brief • PHP Provides a Means for Developers • To Put Instructions in HTML Files • The Instructions are Read & Parsed by Server • They Never Make It to the Browser • The Server Replaces PHP Code with Content • HTML etc. • Forerunner Technology is • Server Side Includes (SSI)

  5. Other Developments • Need for HTML-Embedded Server-Side Scripting Technology was Apparent to Others • Microsoft went after this need with ASP • Active Server Pages • ASP Has Become Quite Popular • In Microsoft Shops • Many Developers Sought More Stable & Less Proprietary Solution • Enter PHP, an Open-Source Server-Parsed HTML-Embedded Programming Language

  6. PHP Benefits • PHP's Primary Strength • Rapid Development of Web Pages • With Modest Amount of Dynamic Content • Developers Without Heavy Programming Experience • Enjoy PHP's Shallow Learning Curve • Complete Tasks Of Modest Complexity • Pulling Records From a Database & • Inserting Them Into an HTML Table

  7. PHP Benefits • PHP Language Architecture • Simple but Powerful • Includes an Extremely Wide Variety of Functions • Suited for Many Tasks • Traditional Data Processing • Web-Oriented Functions

  8. PHP Example <HTML> <HEAD> <TITLE>Welcome!</TITLE> </HEAD> <BODY> <?PHP phpinfo() ?> <!-- more HTML goes here... --> </BODY> </HTML>

  9. PHP Weaknesses • PHP Remains an Immature Language • Without the Architectural Strengths or Extensibility of More Established Languages • Embedded Scripting • Program Code is Mixed With HTML • Some Developers Are Empowered By This • Others Find It Disorganized & Error-Prone • Prefer Separate Development Environments • For Each Web Component

  10. PHP Weaknesses • Advanced Developers • With Experience in Perl, CGI, & mod_perl • May Find Less Reason to Spend Time with PHP • And This May be Entirely Justified • Because They Can Already Do What PHP Can

  11. PHP Strengths • Developers Have Literally Flocked to PHP • Modest Learning Curve • Free & Open Development • Native Database Connectivity • Stability • Availability for a Variety of Server Platforms

  12. In Summary • It is Important to Understand That PHP is not a Unique Solution to Web Development • We're Fortunate to Enjoy a Potpourri of Possible Web Development Tools • Many Tasks can be Performed with a Wide Variety of Technologies • Developers Must Weigh Many Factors in Choosing a Development Path • Previous & Current Experience • Platform Requirements & Support • Time-to-Market Requirements

  13. PHP Documentation • PHP Is Still in an Early Stage of Development • Language Continues to Evolve Significantly • Printed Texts Tend to Lag Behind • Most Current Information Available On-Line • PHP On-Line Manual http://www.php.net/manual/en/

  14. PHP Example <!DOCTYPE ... > <HTML> <HEAD> <TITLE>PHP Test Page</TITLE> </HEAD> <BODY> <?PHP phpinfo() ?> </BODY> </HTML> • Create File Named "php_info.php"

  15. PHP Example <!DOCTYPE ... > <HTML> <HEAD> <TITLE>PHP Test Page</TITLE> </HEAD> <BODY> <?PHP print("<P>Here is some text.</P>"); ?> </BODY> </HTML> • Create File Named "test.php"

  16. PHP Example <?PHP print("<P>\n"); print("Here is some text.\n"); print("</P>\n"); ?> • Modify "test.php"

  17. PHP Example <!DOCTYPE ... > <HTML> <HEAD><TITLE>PHP Date Page</TITLE></HEAD> <BODY> <?PHP print("<P>\n"); print("The current date is: "); print(date("l F j, Y")); print("</P>\n"); ?> </BODY> </HTML> • Create File Named "date.php"

  18. PHP Example <!DOCTYPE ... > <HTML> <HEAD><TITLE>PHP Time & Date Page</TITLE></HEAD> <BODY> <?PHP print("<P>\n"); print("The current time and date are: "); print(date("H:i:s \M\T, l F j, Y")); print("</P>\n"); ?> </BODY> </HTML> • Modify "date.php"

More Related