Friday, May 6, 2011

php notes

0 comments

PHP Notes

(http://www.acm.jhu.edu/~jflemer/php/)
By: James Flemer
Presented: 2000-02-03

    Intro

  1. What is PHP?
    • PHP: Hypertext Preprocessor
    • server-side HTML-embedded scripting language
    • all functions/commands are enclosed by start (<?php) and end tags (?>)
      start and end tags can be different (see docs Sec 2, Ch 5)
    • dynamic pages
    • database support
      • dBase
      • mSQL
      • MySQL
      • Oracle
      • PostgreSQL (*)
      • dbm
  2. Syntax
    • function calls have flexible syntax
    • statements are terminated by a semicolon (;) or a PHP end tag (?>)
    • supports C, C++, and Bourne Shell comments
  3. Types
    • PHP supports:
      • integer
      • floating-point numbers
      • string
      • object
      • array
        • act like both hash tables (associative arrays) and indexed arrays (vectors)
        • multi-dimensional arrays
        • make with: array()
        • sort with: asort()arsort()ksort()rsort()sort()uasort()usort(), and uksort()
        • count the number of items with: count()
    • no explicit type declaration (determined by context)
    • casts (see Sec 2, Ch 6, Type Juggling)

    Dynamic Pages

  4. Includes/Requires
    • headers
    • footers
    • embedded docs / tables
    • remote files
    • requires and loops
    • requires and conditionals
  5. HTML Forms
    • referencing
    • saving
  6. Databases
  7. Security (Note: Not written yet (or ever), email me.)
    • Using .htaccess with Apache
    • Directory security

0 comments:

Post a Comment