PART VI: Secure, Optimize, Debug
In this section I will cover:
- Data Filtering
- Users are evil and sometimes they don’t even know it. You should always “taint” and filter data PHP provides lots of functions that can help here.
Never rely on register_globals. In fact, if you’re writing for redistribution, undo its effects if it is on.
Data filtering depends on what you need to do with it. You will rarely need “raw” data. Most of the time, it needs to be escaped to do something or ether—e.g.: display, insert into db, and so on - SQL Injection
Data filtering
SQL injection
Command injection
XSS
Safe mode
Coding Standards
Error logging
Debugging and optimization
- Read more
- 677 reads
PART V: Databases and Networks
In this section I will cover:
- Databasics
- The exam covers databases at an abstract level. No specific implementation
SQL-92 standards only
Only the basics of database design and programming are actually required
Table creation/population/manipulation, Data extraction, Reference integrity
Joins / Grouping / AggregatesRelational databases: Called because the relationship among different entities is its foundation
• Schemas/databases
• Tables
• Rows
Data types
• Int
• Float
• Char/varchar
• BlOBs
- Indices
Databasics
Indices and keys
Table manipulation
Joins
Aggregates
Transactions
File wrappers
Streams
- Read more
- 662 reads
PART IV: Files and E-mail
In this section I will cover:
Opening and closing files
Reading from and writing to files
Getting information about a file
Copying, renaming, deleting files
File permissions
File locks
Sending e-mail
MIME
HTML E-mails
Multipart E-mails
- Files — Opening and Closing
- Files are open using the fopen() function:
fopen ($filename, $mode)
returns a file resource (not a pointer!)
The $mode parameter indicates how the file should be open:
r — read only
r+ — read/write
w — write only and create the file
w+ — read/write and create the file
a — write only and position at end of file
- Read more
- 937 reads
PART III : User Input / Time & Dates
In this section we will cover:
HTML form management
File uploads
Cookies
Magic Quotes
Sessions
Times and dates in PHP
Formatting date values
Locale-dependent date formatting
Date validation
- HTML Form Management
- HTML forms are submitted by the browser using either GET or POST
GET transaction data is sent as part of the query string
POST data is sent as part of the HTTP transaction itself
POST is often considered “safer” than GET—WRONG!
POST data is made available as part of the $_POST superglobal array
GET data is made available as part of the $_GET superglobal array
Both are “superglobal”—in-context everywhere in your scripts
- Read more
- 882 reads
PART II : Strings and Arrays
In this section we will cover:
Comparisons
Basic search and replace
Regular Expressions
String functions and formatting
Accessing arrays
Single- and multidimensional arrays
Array iteration
Array sorting
Array functions and manipulation
Serialization
- Read more
- 793 reads













