作者:empty 页数:720 出版社:empty |
The authors and publisher have taken care in the preparation of this book.but make no expressed or impliedwaranty of any kind and assu in eno responsibility for errors gr omissions.No liability is assumed far inc iden-t lar can sequential damages in coa nection w thora sing out of the use of the informa bon or programs con.tained herein.
To If at, my wife and best friend, who has patiently put up with myin vol ement in PHP from the very beginning, and has encouragedTo my parents, who care for me even when Im not around;About Prentice Hall Professional Technical ReferenceWth origins reaching back to the industry's first computer science publishing programin the ig6os, and formally launched as its own imprint in ag 86, Prentice Hall ProfessionalTechnical Reference(PHP TR) has developed into the leading provider of technical booksin the world today Our editors now publish over zoobooks annually, authored byleaders in the elds of computi g.engineering.and business.Durr aots are firmly planted in the soil that gave rise to the technical revolution.Dur bookshelf contains many of the industr'S computing and engineering classics:Kernighan and Ritchie'C Programming Long uage, Nemeth sUNIX Syste rAdministration Handbook, Horstmann'sCore jave, and Johnson'High-Speed Digital Design.PHP TR acknowledges its auspicious beginnings while it looks to thel uture for inspiration.We continue to evolve and break new ground inpublishing by pra viding to dayS professionals with tomorrow'
Contents
Preface:Introduction and Baek ground
Chapter1:WhatIsNewinPHP5?
Chapter2:PHP5BasicLanguage
Chapter3:PHP500Language
Chapter4:PHP5AdvancedOOPandDesignPatterns
Chapter5:HowtoWriteaWebApplicationwithPHP
Chapter6:DatabaseswithPHP5
Chapter7:ErrorHandling
Chapter8:XMLwithPHP5
Chapter9:MainstreamExtensions
Chapter10:UsingPEAR
Chapter11:ImportantPEARPackages
Chapter12:BuildingPEARComponents
Chapter13:MakingtheMove
Chapter14:Performance
Chapter15:AnIntroductiontoWritingPHPExtensions
Chapter16:PHPShellSeripting
A.PEAR and PECL Package Index
phpDocumentor Format Reference
Zend Studio QuickStart
Index
1.1 Introduction.
1.2 Language Features.
1.2.1 New Object-Oriented Mode.
1.2.2 New Object-Oriented Features.
1.2.3 Other New Language Features.
1.3 General PHP Changes.
1.3.1XML and WebServices.
1.4 Other New Features in PHP 5.
1.4.1 New Memory Manager.
1.4.2 Dropped Support for Window a 95.
1.5 Summary.
2PHP 5 Basic Language.
2.1 Introduction.
2.2HTML Embedding.
2.3 Comments, .
2.4 Variables.
3.4 The new Keyword and Constructors.
2.4.1 Indirect References to Variables
2.4.2 Managing Variables.
2.4.3 Super globals.
2.5 Basic DataTypes.
2.5.1 Integers.
2.5.2 Floating-Point Numbers
2.5.8 Strings.
2.5.4 Booleans.
2.5.5Null.
2.5.6 Resources.
2.5.7 Arrays.
2.5.8 Constants.
2.6 Operators.
2.6.1 Binary Operator.
2.6.2A 8 signment Operators.
2.6.3 Comparison Operators.
2.6.4 Logical Operators.
2.6.5 Bitwise Operators.
2.6.6Unary Operator a.
2.6.7 Negation Operators.
2.6.8 Increment/Decrement Operators.
2.6.9 The Cast Operators.
2.6.10 The Silence Operator.
2.6.11 The One and Only Ternary Operator.
2.7 Control Structures.
2.7.1 Conditional Control Structure.
2.7.2Loop Control Structures.
2.7.3 Code Inclusion Control Structures.
2.8 Function 8.
2.8.1 User-Defined Functions.
2.8.2 Function Scope.
2.8.3 Returning Values By Value.
2.8.4 Returning Values By Reference.
2.8.5 Declaring Function Parameters.
2.8.6 Static Variables.
2.9 Summary.
3.6 Accessing Methods and Properties Using the s this Varia.
3.6.1 public, protected, and private Properties.
3.6.2 public, protected, and private Methods.
3.6.3 Static Properties.
3.6.4 Static Methods.
3.7 Class Constants.
3.8 Cloning Objects.
3.9 Polymorphism.
3.10 parent:and self.
3.11 instance of Operator.
3.12 Abstract Methods and Classes.
3.13 Interfaces.
3.14 Inheritance of Interfaces.
3.15 final Methods.
3.16 final Classes.
3.17 toString() Method.
3.18 Exception Handling.
3.19_autoload() .
4.2.1 Property and Method Overloading.
4.2.2 Overloading the Array Access Syntax.
4.4.1StrategyPattemn.
4.4.2 Singleton Pattern.
4.4.3 Factory Pattern.
4.4.4 Observer Pattern.
4.5.1 Introduction.
4.5.2 Reflection API.
4.5.3 Reflection Examples.
5.4.1 Common Mistakes.
5.5.1 Input Validation.
5.5.2HMAC Verification.
5.5.3PEAR:Crypt_HMA.
5.5.4 Input Filter.m
5.5.5 Working with Passwords.
5.5.6 Error Handling.
3.20 ClassType Hints in Function Parameters.
3.21 Summary.
4PHP 5 Advanced OOP and Design Patterns.
4.1In traduction.
4.2 Overloading Capabilities.
4.3 Iterators.
4.4 Design Patterns.
4.5 Reflection.
6.2.1 MySQL Strengths and Weaknesses
6.2.2PHP Interface.
6.2.3 Example Data.
6.2.4 Connections.
6.2.5 Buffered Versus Unbuffered Queries.
6.2.6 Queries.
6.2.7 Multi Statements.
6.2.8 Fetching Modes.
6.2.9 Prepared Statements.
6.2.10BLOB Handling.
6.3.1SQLite Strengths and Weaknesses
6.3.2 Best Areas of Use.
6.3.3PHP Interface.
6.4.1 Obtaining PEAR.
6.4.2PrasandCons of Database Abstraction.
6.4.3 Which Features Are Abstracted?.
6.4.4 Database Connections.
6.4.5 Executing Queries.
6.4.6 Fetching Results.
6.4.7 Sequences.
6.4.8 Portability Features.
6.4.9 Abstracted Errors.
6.4.10 Convenience Methods.
7.2.1 Programming Errors.
7.2.2 Undefined Symbols.
7.2.3 Portability Errors.
4.5.4 Implementing the Delegation Pattern Using Reflect n.
4.6 Summary.
5HowtoWriteaWeb Application with PHP.
5.1 Introduction.
5.2 Embedding into H.
5.3 UserInput.
.5.4Safe-Handling User In pu.
5.5TechniuestoMakeSeripts Safe .
5.6 Cookies.
5.7 Sessions.
5.8 File Uploads.
5.8.1 Handling the Incoming Uploaded File.
5.9 Architecture.
5.9.1One Script Serves All.
5.9.2One Script per Function.
5.9.3 Separating Logic from Lay.
5.10 Summary.
6 Databases with PHP 5.
6.1 Introduction.
6.2 MySQL.
6.3SQLite.
6.4PEARDB.
6.5 Summary.
7 Error Handling.
7.1 Introduction.
7.2 Types of Errors.
7.2.4 Runtime Errors.
7.2.5PHP Errors.
7.3PEARErrora.
7.3.1ThePEARErrorCla8s.
7.3.2 Handling PEAR Errors.
7.3.3PEAR Error Modes.
7.3.4 Graceful Handling.
7.4 Exceptions.
7.4.1 What Are Exception.?.
7.4.2try.catch, and throw.
7.5 Summary.
8XML with PHP 5.
8.1 Introduction.
8.2 Vocabulary.
8.3 Parsing XML.
9.2.1 File Access.
8.3.2DOM.
8.4 SimpleX.L.
8.4.1 Creating a SimpleXML Obie.
8.4.2 Browsing SimpleXML Object a.
8.4.3 Storing SimpleXML Objects.
8.5PEAR.
8.5.1XML_Tre.
8.5.2XML_RSS.
8.6 Converting XML.
8.6.1XSLT.
8.7 Communi eating with XML.
8.7.1XML-RPC.
8.7.2SOAP.
8.8 Summar