Saturday, 4 July 2015

Teach Yourself PHP4

PCREs and Greediness 344
PCREs and Backslashed Characters 345
Finding Matches Globally with preg_match_all() 347
Using preg_replace() to Replace Patterns 350
Modifiers 351
Summary 354
Q&A 354
Workshop 355
Quiz 355
Activity 355
Hour 19: Saving State with Cookies and Query Strings 356
Overview 356
Cookies 356
The Anatomy of a Cookie 357
Setting a Cookie with PHP 358
Deleting a Cookie 360
Creating Session Cookies 360
An Example— Tracking Site Usage 361
Working with the Query String 369
Creating a Query String 370
Summary 372
Q&A 373
Workshop 373
Quiz 373
Activities 374
Hour 20: Saving State with Session Functions 375
Overview 375
What Are Session Functions? 375
Starting a Session with session_start() 376
Working with Session Variables 377
Destroying Sessions and Unsetting Variables 382
Passing Session IDs in the Query String 383
Encoding and Decoding Session Variables 384
Checking that a Session Variable Is Registered 385
Summary 385
Q&A 386
Workshop 386
Quiz 386
Activities 386
Hour 21: Working with the Server Environment 388
Overview 388
Opening Pipes to and from Processes with popen() 388
Running Commands with exec() 392
Running External Commands with system() or the Backtick
Operator 393
Plugging Security Holes with escapeshellcmd() 394
Running External Applications with passthru() 396
Calling an External CGI Script with the virtual() Function 397
Summary 398
Q&A 398
Workshop 399
Quiz 399
Activities 400
Hour 22: Debugging 401
Overview 401
Getting Information About PHP and Your Script 401
phpinfo() 401
Viewing Source with Syntax Coloring 405
PHP Error Messages 407
Writing Error Messages to a Log File 410
Getting the Error String 412
Manual Debugging 412
Common Errors 414
Summary 416
Q&A 417
Workshop 417
Quiz 417
Activity 417
Hour 23: An Example (Part 1) 418
Overview 418
The Brief 418
The Structure 418
Designing the Database 419
Design Choices 421
The Members Environment 421
join.php and dblib.inc 421
updateclub.php 429
membersmenu.php 437
login.php 438
updateevent.php 441
reviewevents.php 450
Summary 455
Q&A 455
Workshop 456
Quiz 456
Activity 456
Hour 24: An Example (Part 2) 457
Overview 457
The Events Diary Public Screens 457
viewevents.php 457
viewclubs.php 466
viewclub.php 470
viewevent.php 473
The Future 476
Summary 477
Q&A 477
Workshop 477
Quiz 477
Activities 478

No comments:

Post a Comment