Web Programming with PHP 5


Last Word: CSS I am not teaching HTML or CSS; it is a pain and it is outside the scope of this talk. CSS is not perfect; you will end up blending old stuff with as much CSS as you can.

PHP as an Acronym This is called a “Recursive Acronym” GNU? ” G NU’s N ot U nix!” CY GNUS? ” C Y GNUS is Your GNU Support” Why the Name Matters Hypertext is just HTML “Preprocessor” is important for PHP Lexical Substitution Conditions and File Includes PHP “PHP: Hypertext Preprocessor” Similar to C++ Preprocessor… How PHP Works WEB SERVER Source File PHP Apache/ IIS HTML The purpose of a web server is precisely to send HTML to the browser! Why do we care? 100% Platform-Independent for the user No additional style or content-arrangement concerns Intelligent application design: How much is done by server? Understand: Goofy animations are done with Javascript, Flash, whatever. PHP is for page content. …. Basic PHP Syntax Always start, end with < ?php …stuff… ? > Syntax draws heavily from C Declare a variable by naming them with a dollar sign. All lines end with a semicolon Output HTML using “echo” < html > … < body > … < ?php $name = ‘Bob the Fish’ ; $age = 11; $dog_age = $age * 7; echo $name; echo ‘ is ‘ ; echo $dog_age; echo ‘ in Dog Years.’ ; ? > …

Download Web Programming with PHP 5.Pdf

Leave a Reply