Cover image for Core PHP programming : using PHP to build dynamic Web sites
Title:
Core PHP programming : using PHP to build dynamic Web sites
Author:
Atkinson, Leon.
Personal Author:
Edition:
Second edition.
Publication Information:
Upper Saddle River, NJ : Prentice Hall, [2001]

©2001
Physical Description:
xxv, 769 pages : illustrations ; 24 cm + 1 computer laser optical disc (4 3/4 in.)
Language:
English
ISBN:
9780130893987
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Central Library QA76.73.P224 A85 2001 Book and Software Set Central Closed Stacks
Searching...

On Order

Summary

Summary

A developer's guide for PHP, this text features coverage of PHP version 4.0. PHP is an Open Source server-side scripting language for the Web. It's used for creating dynamic Web pages and scripting on the Apache Server.


Author Notes

LEON ATKINSON is Chief Technologist for Clear Ink Corporation, an agency offering traditional and Web communication services. He is creator and maintainer of the FreeTrade project, an Open Source e-commerce toolkit, and an enthusiastic supporter of PHP.


Table of Contents

Forewordp. xv
Prefacep. xvii
Acknowledgmentsp. xix
Table of Listingsp. xxi
Part 1 Programming With PHPp. 1
1 An Introduction to PHPp. 3
The Origins of PHPp. 4
What Makes PHP Better than Its Alternativesp. 6
Interfaces to External Systemsp. 7
How PHP Works with the Web Serverp. 8
Hardware and Software Requirementsp. 9
Installation on Apache for UNIXp. 10
Installation on IIS for Windows NTp. 12
Editing Scriptsp. 12
Algorithmsp. 13
What a PHP Script Looks Likep. 14
Saving Data for Laterp. 16
Receiving User Inputp. 18
Choosing between Alternativesp. 22
Repeating Codep. 22
Conclusionp. 23
2 Variables, Operators, and Expressionsp. 25
Identifiersp. 25
Data Typesp. 26
Variable Creation and Scopep. 29
Assigning Values to Variablesp. 33
Retrieving Valuesp. 35
Freeing Memoryp. 35
Constantsp. 37
Operatorsp. 38
Logical and Relational Operatorsp. 40
Bitwise Operatorsp. 41
Miscellaneous Operatorsp. 42
Assignment Operatorsp. 46
Expressionsp. 46
3 Control Statementsp. 51
True and Falsep. 51
The if Statementp. 52
The ? Operatorp. 53
The switch Statementp. 56
Loopsp. 58
The while Statementp. 58
The break Statementp. 60
The continue Statementp. 61
The do...while Statementp. 62
The for Statementp. 63
The foreach Statementp. 66
exit, die, and returnp. 66
Evaluation of Boolean Expressionsp. 67
4 Functionsp. 69
Declaring a Functionp. 69
The return Statementp. 71
Scope and the global Statementp. 71
Argumentsp. 72
Recursionp. 75
Dynamic Function Callsp. 77
5 Arraysp. 79
Single-Dimensional Arraysp. 79
Indexing Arraysp. 80
Initializing Arraysp. 82
Multidimensional Arraysp. 83
Casting Arraysp. 84
Referencing Arrays Inside Stringsp. 85
6 Classes and Objectsp. 91
Defining a Classp. 92
Creating an Objectp. 95
Accessing Properties and Methodsp. 96
7 I/O and Disk Accessp. 99
HTTP Connectionsp. 99
Writing to the Browserp. 101
Output Bufferingp. 102
Environment Variablesp. 103
Getting Input from Formsp. 104
Cookiesp. 106
File Uploadsp. 107
PUT Method Requestsp. 108
Reading and Writing to Filesp. 109
Sessionsp. 111
The include and require Functionsp. 114
Part 2 Functional Referencep. 117
8 I/O Functionsp. 119
Sending Text to the Browserp. 119
Output Bufferingp. 122
Filesp. 124
Compressed File Functionsp. 163
POSIXp. 170
Debuggingp. 175
Session Handlingp. 200
Shell Commandsp. 203
HTTP Headersp. 205
Network I/Op. 207
FTPp. 214
9 Data Functionsp. 225
Data Types, Constants, and Variablesp. 225
Arraysp. 231
Hashingp. 257
Stringsp. 261
Encoding and Decodingp. 269
Encryptionp. 291
Regular Expressionsp. 297
Perl-Compatible Regular Expressionsp. 300
10 Mathematical Functionsp. 307
Common Mathp. 307
Random Numbersp. 316
Arbitrary-Precision Numbersp. 319
11 Time, Date, and Configuration Functionsp. 323
Time and Datep. 323
Alternative Calendarsp. 332
Configurationp. 336
12 Image Functionsp. 345
Analyzing Imagesp. 346
Creating JPEG, PNG, and WBMP Imagesp. 348
13 Database Functionsp. 385
dBasep. 386
DBM-style Database Abstractionp. 391
fileProp. 397
Informixp. 399
InterBasep. 408
mSQLp. 415
MySQLp. 427
ODBCp. 444
Oraclep. 456
Postgresp. 479
Sybasep. 490
14 Miscellaneous Functionsp. 501
Apachep. 501
Aspellp. 506
COMp. 507
Gettextp. 509
IMAPp. 511
Javap. 534
LDAPp. 535
Semaphoresp. 548
Shared Memoryp. 550
SNMPp. 555
WDDXp. 558
XMLp. 561
Part 3 Algorithmsp. 577
15 Sorting, Searching, and Random Numbersp. 579
Sortingp. 580
Bubble Sortp. 580
Quicksortp. 583
Built-In Sorting Functionsp. 585
Sorting with a Comparison Functionp. 591
Searchingp. 595
Indexingp. 595
Random Numbersp. 598
Random Identifiersp. 602
Choosing Banner Adsp. 605
16 Parsing and String Evaluationp. 607
Tokenizingp. 607
Regular Expressionsp. 610
Defining Regular Expressionsp. 611
Using Regular Expressions in PHP Scriptsp. 612
17 Database Integrationp. 623
Building HTML Tables from SQL Queriesp. 624
Tracking Visitors with Session Identifiersp. 629
Storing Content in a Databasep. 634
Database Abstraction Layersp. 642
18 Networkp. 645
HTTP Authenticationp. 645
Controlling Browser Cachep. 648
Setting Document Typep. 651
Email with Attachmentsp. 651
Verifying an Email Addressp. 656
19 Generating Graphicsp. 663
Dynamic Buttonsp. 664
Generating Graphs on the Flyp. 669
Bar Graphsp. 669
Pie Chartsp. 672
Stretching Single-Pixel Imagesp. 678
Part 4 Software Engineeringp. 681
20 Integration with HTMLp. 683
Sprinkling PHP within an HTML Documentp. 683
Using PHP to Output All HTMLp. 688
Separating HTML from PHPp. 690
Creating [SELECT] Fieldsp. 692
Passing Arrays in Formsp. 695
21 Designp. 699
Writing Requirements Specificationsp. 700
Writing Design Documentsp. 704
Using CVSp. 705
Modularization Using includep. 706
FreeEnergyp. 708
FastTemplatep. 710
Midgardp. 711
Ariadnep. 711
Preserving State and Providing Securityp. 712
Cloakingp. 713
URLs Friendly to Search Enginesp. 714
Running a Script Regularlyp. 716
22 Efficiency and Debuggingp. 719
Measuring Performancep. 720
Fetching Database Query Resultsp. 721
When to Store Content in a Databasep. 722
In-Line Debuggingp. 724
Remote Debuggingp. 724
Simulating HTTP Connectionsp. 725
Appendix Ap. 727
Appendix Bp. 729
Appendix Cp. 735
Appendix Dp. 737
Appendix Ep. 739
Appendix Fp. 743
Appendix Gp. 745
Indexp. 751

Google Preview