作者:empty 页数:377 出版社:empty |
e2004by Premier Press, a division of Course Technology.All rightsreserved.No part of this book maybe reproduced or transmitted in anyform or by any means, electronic or mechanical in du ding photocopy-ing.recording, or by any information storage or retrieval system with-out written permission from Course PTR, except for the inclusion ofbrief quotations in a review.The Premier Press logo and related trade dress are trademarks of PremierPress and may no the used without written permission,PaintShop Pro8isa registered trademark of Jasc SoftwarePHP Code risa trademark of php IDEAll other trademarks are the property of the irrespective owners.Important:Course PTR can not provide software support.Please contactthe appropriate software manufacturers technical support line or Website for assistance.
Course PTR and the author have attempted throughout this ba ok todistin gui h proprietary trademarks from descriptive terms by folla wingthe capital iza tian style used by the manufacturer.Information contained in this book has been obtained by Course PTRfrom source she lieved to be reliable.However.because of the possibilityof human or mechanical err arb your sources, Course PTR, or others,the Publisher daes not guarantee the accuracy, adequacy.or completeness of any information and is not responsible for any error so rom is-sions or the results obtained from use of such information.Readersshould be particularly aware of the fact that the Internet is a neverchanging entity.Some facts may have changed since this book went topress.Educational facilities, companies, and organizations interested in multi-ple copies or licensing of this book should contact the publisher forquantity discount informati an.Training manuals, CD-ROMs, and por-tions of this book are also available individually or can be tailored forspecific needs.
Chapter 1
Chapter 2
Chapter 3
PART II
Chapter 4
Chapter 5
Introduction.
INTRODUCTION TO THE WORLD OF PHP. 1
So What Is All This Server Stuff?.3
Understanding the Client/Server Relationship.3
The WebServer.5
Sessions and Session Variables.5
TCP/IP.13
Install ng the liS WebServer.14
Installation on Windows 2000/XP Professional.15
Installation on Windows 98.17
Instal ng the Apache WebServer on Windows ME/XP.18
Installing the Apache WebServer on UNIX.19
Waging the Configuration War.23
The Platforms.23
Building and Installing PHP on UNIX.24
Installation on Windows for I IS/Apache.26
Installing the Windows Extensions.29
Testing Your Installation.29
l Have Conquered the Server, Let Meat the Code !. 31
The Basics of the HTML Tag.31
The Almighty HTMLDocument.32
The HTML Body.33
Graphics and HTML.36
The File Formats.37
Using the File Formats in Your Document.39
Tables.41
Layouts, Tables, and Graphics.44
Creating Forms for Input.48
Conclusion.51
ENTER THE LANGUAGE . 53
Say Hello to PHP.55
Creating a PHP Page.56
DataTypes.57
TypeCasting.58
Variable Variables.58
Constants.58
Naming Conventions.59
Functions for Variables.60
Functions for Strings.61
print f 0 and sprintf 0.64
Regular Expressions and Pattern Matching.66
Using the RegularExpression Functions.68
Processing Forms with PHP.71
Conclusion.76
Operators, Statements, and Functions.77
Operators.77
Arithmetic Operators.78
Comparison Operators.78
Logical Operators.79
Ternary Operator.80
Bitwise Operators.82
Variable Assignment Shortcuts.85
Operation Precedence.86
PART III
Chapter 6
Chapter 7
Chapter 8
Chapter 9
PART IV
Chapter 10
ARRAYS, GAMES, AND GRAPHICS.101
Arrays!.103
Initializing Arrays.104
Using Strings for Indexes.105
Looping through Sequential Arrays.106
Looping through Non-Sequential Arrays.108
Multi-Dimensional Arrays.110
5orting Arrays.112
Your First PHP Game.117
Conclusion.132
Playing with Chess and Databases.133
Non-Relational Databases.134
Creating and Opening a Database.134
Looping through the Database.136
Inserting an Entry into Your Database,.137
Updating an Entry in Your Database.139
Deleting an Entry from Your Database.140
Chess Programming:A Quick Overview.140
Starting the Chess Game.141
Working with the Pieces.143
Getting the UserInput and Modifying the Database.151
Conclusion.156
GD Graphics Overview.157
What Is GD?.157
Installing GD.158
Creating and Using a New Image.160
Howto Use Colors.161
Allocating Colors to an image.161
Filling the Image.162
Setting Your Transparent Color.163
Converting a True-Color Image to a Palette lm age.165
Counting Colors in an Image.165
Retrieving a Color at a Point.166
Drawing Basic Shapes on Your Empty Canvas.167
Pixels and Lines.167
From Lines to Rectangles.169
From Rectangles to Polygons.172
From Polygons to Arcs and Ellipses.174
Creating Images with Text.179
Saving Your Images.184
Using Existing Images.185
Conclusion.192
Creating Battle Tank and Using Dynamic Terrain.193
Planning Battle Tank.193
Creating the Grap