Core PHP Programming, 3/e (Paperback)
暫譯: 核心 PHP 程式設計 (第三版)

Leon Atkinson, Zeev Suraski

  • 出版商: Prentice Hall
  • 出版日期: 2003-08-15
  • 售價: $2,200
  • 貴賓價: 9.5$2,090
  • 語言: 英文
  • 頁數: 1104
  • 裝訂: Paperback
  • ISBN: 0130463469
  • ISBN-13: 9780130463463
  • 相關分類: PHP
  • 已過版

買這商品的人也買了...

相關主題

商品描述

Core PHP Programming, Third Edition is the most authoritative guide to the new PHP5. Leading PHP developer Leon Atkinson and PHP5/Zend 2.0 co-creator Zeev Suraski cover every facet of real-world PHP5 development, taking students from basic syntax to advanced object-oriented development. Atkinson and Suraski cover networking, data structures, regular expressions, math, configuration, graphics, MySQL/PostgreSQL support, XML, algorithms, debugging, optimization, the Zend 2.0 engine, and much more. They also offer an authoritative introduction to PHP5 design patterns—including the popular Singleton, Factory and Observer design patterns—helping students discover today's best practices for building robust, efficient PHP5 code. Building on two previous editions, this book presents more than 650 downloadable examples—all reflecting the insights of the creators of the Zend Engine that drives high-performance PHP5 development. From start to finish, it has been carefully technically reviewed by PHP5 co-creator Andi Gutmans.

Table of Contents

Foreword.
Preface.
Acknowledgments.

I. PROGRAMMING WITH PHP.

1. An Introduction to PHP.

The Origins of PHP. PHP Is Better Than Its Alternatives. Interfaces to External Systems. How PHP Works with the Web Server. Hardware and Software Requirements. What a PHP Script Looks Like. Saving Data for Later. Receiving User Input. Choosing Between Alternatives. Repeating Code.

2. Variables, Operators, and Expressions.

A Top-Down View. Data Types. Variables. Constants. Operators. Building Expressions.

3. Control Statements.

The if Statement. The ? Operator. The switch Statement. Loops. exit, die, and return. Exceptions. Declare.

4. Functions.

Declaring a Function. The return Statement. Scope. Static Variables. Arguments. Recursion. Dynamic Function Calls.

5. Arrays.

Single-Dimensional Arrays. Indexing Arrays. Initializing Arrays. Multidimensional Arrays. Casting Arrays. The + Operator. Referencing Arrays Inside Strings.

6. Classes and Objects.

Object-Oriented Programming. The PHP 5 Object Model. Defining a Class. Constructors and Destructors. Cloning. Accessing Properties and Methods. Static Class Members. Access Types. Binding. Abstract Methods and Abstract Classes. User-Level Overloading. Class Autoloading. Object Serialization. Namespaces. The Evolution of the Zend Engine.

7. I/O and Disk Access.

HTTP Connections. Writing to the Browser. Output Buffering. Environment Variables. Getting Input from Forms. Passing Arrays in Forms. Cookies. File Uploads. Reading and Writing to Files. Sessions. The include and require Functions. Don't Trust User Input.

II. FUNCTIONAL REFERENCE.

8. Browser I/O.

Pregenerated Variables. Pregenerated Constants. Sending Text to the Browser. Output Buffering. Session Handling. HTTP Headers.

9. Operating System.

Files. Compressed File Functions. Direct I/O. Debugging. POSIX. Shell Commands. Process Control.

10. Network I/O.

General Network I/O. Sockets. FTP. Curl. SNMP.

11. Data.

Data Types, Constants, and Variables. Arrays. Objects and Classes. User Defined Functions.

12. Encoding and Decoding.

Strings. String Comparison. Encoding and Decoding. Compression. Encryption. Hashing. Spell Checking. Regular Expressions. Character Set Encoding.

13. Math.

Common Math. Random Numbers. Arbitrary-Precision Numbers.

14. Time and Date.

Time and Date. Alternative Calendars.

15. Configuration.

Configuration Directives. Configuration.

16. Images and Graphics.

Analyzing Images. Creating Images.

17. Database.

DBM-Style Database Abstraction. DBX. LDAP. MySQL. ODBC. Oracle. Postgres. Sybase and Microsoft SQL Server.

18. Object Layers.

COM. CORBA. Java.

19. Miscellaneous.

Apache. IMAP. MnoGoSearch. OpenSSL. System V Messages. System V Semaphores. System V Shared Memory.

20. XML.

DOM XML. Expat XML. WDDX.

III. ALGORITHMS.

21. Sorting, Searching, and Random Numbers.

Sorting. Built-In Sorting Functions. Sorting with a Comparison Function. Searching. Indexing. Random Numbers. Random Identifiers. Choosing Banner Ads.

22. Parsing and String Evaluation.

Tokenizing. Regular Expressions. Defining Regular Expressions. Using Regular Expressions in PHP Scripts.

23. Database Integration.

Building HTML Tables from SQL Queries. Tracking Visitors with Session Identifiers. Storing Content in a Database. Database Abstraction Layers.

24. Networks.

HTTP Authentication. Controlling the Browser's Cache. Setting Document Type. Email with Attachments. HTML Email. Verifying an Email Address.

25. Generating Graphics.

Dynamic Buttons. Generating Graphs on the Fly. Bar Graphs. Pie Charts. Stretching Single-Pixel Images.

IV. SOFTWARE ENGINEERING.

26. Integration with HTML.

Sprinkling PHP within an HTML Document. Using PHP to Output All HTML. Separating HTML from PHP. Generating HTML with PHP.

27. Design.

Writing Requirements Specifications. Writing Design Documents. Change Management. Modularization Using include. FreeEnergy. Templates. Application Frameworks. PEAR. URLs Friendly to Search Engines.

28. Efficiency and Debugging.

Optimization. Measuring Performance. Optimize the Slowest Parts. When to Store Content in a Database. Debugging Strategies. Simulating HTTP Connections. Output Buffering. Output Compression. Avoiding eval. Don't Load Extensions Dynamically. Improving Performance of MySQL Queries. Optimizing Disk-Based Sessions. Don't Pass by Reference (or, Don't Trust Your Instincts). Avoid Concatenation of Large Strings. Avoid Serving Large Files with PHP-Enabled Apache. Understanding Persistent Database Connections. Avoid Using exec, Backticks, and system If Possible. Use php.ini-recommended. Don't Use Regular Expressions Unless You Must. Optimizing Loops. IIS Configuration.

29. Design Patterns.

Patterns Defined. Singleton. Factory. Observer. Strategy.

A. Escape Sequences.
B. ASCII Codes.
C. Operators.
D. PHP Tags.
E. PHP Compile-Time Configuration.
F. Internet Resources.
G. PHP Style Guide.
INDEX.

商品描述(中文翻譯)

核心 PHP 程式設計(第三版)》是關於新 PHP5 的最權威指南。領先的 PHP 開發者 Leon Atkinson 和 PHP5/Zend 2.0 的共同創造者 Zeev Suraski 涵蓋了現實世界中 PHP5 開發的每一個面向,帶領學生從基本語法學習到進階的物件導向開發。Atkinson 和 Suraski 涵蓋了網路、資料結構、正規表達式、數學、配置、圖形、MySQL/PostgreSQL 支援、XML、演算法、除錯、優化、Zend 2.0 引擎等多個主題。他們還提供了對 PHP5 設計模式的權威介紹,包括流行的 Singleton、Factory 和 Observer 設計模式,幫助學生發現當今構建穩健、高效 PHP5 代碼的最佳實踐。基於前兩版的基礎,本書提供了超過 650 個可下載的範例,所有範例都反映了驅動高效能 PHP5 開發的 Zend Engine 創造者的見解。從頭到尾,這本書都經過 PHP5 共同創造者 Andi Gutmans 的仔細技術審查。

目錄

前言。
序言。
致謝。

I. 使用 PHP 程式設計。
1. PHP 簡介。
PHP 的起源。PHP 比其他選擇更好。與外部系統的介面。PHP 如何與網頁伺服器協作。硬體和軟體需求。PHP 腳本的樣子。保存資料以便日後使用。接收用戶輸入。選擇替代方案。重複代碼。

2. 變數、運算符和表達式。
自上而下的視角。資料類型。變數。常數。運算符。構建表達式。

3. 控制語句。
if 語句。? 運算符。switch 語句。迴圈。exit、die 和 return。例外。declare。

4. 函數。
聲明函數。return 語句。範圍。靜態變數。參數。遞迴。動態函數調用。

5. 陣列。
一維陣列。索引陣列。初始化陣列。多維陣列。類型轉換陣列。+ 運算符。在字串內引用陣列。

6. 類和物件。
物件導向程式設計。PHP 5 物件模型。定義類。建構函數和解構函數。克隆。訪問屬性和方法。靜態類成員。訪問類型。綁定。抽象方法和抽象類。用戶級重載。類自動加載。物件序列化。命名空間。Zend Engine 的演變。

7. I/O 和磁碟存取。
HTTP 連接。寫入瀏覽器。輸出緩衝。環境變數。從表單獲取輸入。在表單中傳遞陣列。Cookies。檔案上傳。讀取和寫入檔案。會話。include 和 require 函數。不要信任用戶輸入。

II. 功能參考。
8. 瀏覽器 I/O。
預生成變數。預生成常數。向瀏覽器發送文本。輸出緩衝。會話處理。HTTP 標頭。

9. 作業系統。
檔案。壓縮檔案函數。直接 I/O。除錯。POSIX。Shell 命令。進程控制。

10. 網路 I/O。
一般網路 I/O。Sockets。FTP。Curl。SNMP。

11. 資料。
資料類型、常數和變數。陣列。物件和類。用戶定義函數。

12. 編碼和解碼。
字串。字串比較。編碼和解碼。壓縮。加密。雜湊。拼寫檢查。正規表達式。字元集編碼。

13. 數學。
常見數學。隨機數。任意精度數字。

14. 時間和日期。
時間和日期。替代日曆。

15. 配置。
配置指令。配置。

16. 圖像和圖形。
分析圖像。創建圖像。

17. 資料庫。
DBM 風格的資料庫抽象。DBX。LDAP。MySQL。ODBC。Oracle。Postgres。Sybase 和 Microsoft SQL Server。

18. 物件層。
COM。CORBA。Java。

19. 其他。
Apache。IMAP。MnoGoSearch。OpenSSL。System V 訊息。System V 信號量。System V 共享記憶體。

20. XML。
DOM XML。Expat XML。WDDX。

III. 演算法。
21. 排序、搜尋和隨機數。
排序。內建排序函數。使用比較函數排序。搜尋。索引。隨機數。隨機識別碼。選擇橫幅廣告。

22. 解析和字串評估。
斷詞。正規表達式。定義正規表達式。在 PHP 腳本中使用正規表達式。

23. 資料庫整合。
從 SQL 查詢構建 HTML 表格。使用會話識別碼追蹤訪客。將內容存儲在資料庫中。資料庫抽象層。

24. 網路。
HTTP 認證。控制瀏覽器的快取。設置文檔類型。帶附件的電子郵件。HTML 電子郵件。驗證電子郵件地址。

25. 生成圖形。
動態按鈕。即時生成圖表。條形圖。圓餅圖。拉伸單像素圖像。

IV. 軟體工程。
26. 與 HTML 整合。
在 HTML 文檔中插入 PHP。使用 PHP 輸出所有 HTML。將 HTML 與 PHP 分開。使用 PHP 生成 HTML。

27. 設計。
撰寫需求規範。撰寫設計文檔。變更管理。使用 include 模組化。FreeEnergy。模板。應用框架。PEAR。對搜尋引擎友好的 URL。

28. 效率和除錯。
優化。測量性能。優化最慢的部分。何時將內容存儲在資料庫中。除錯策略。模擬 HTTP 連接。輸出緩衝。輸出壓縮。避免使用 eval。不要動態加載擴展。改善 MySQL 查詢的性能。優化基於磁碟的會話。不要通過引用傳遞(或,不要相信你的直覺)。避免連接大型字串。避免使用 PHP 啟用的 Apache 服務大型檔案。理解持久性資料庫連接。避免使用 exec、反引號和 system(如果可能)。使用 php.ini 建議的設置。除非必要,否則不要使用正規表達式。優化迴圈。IIS 配置。

29. 設計模式。
定義模式。Singleton。Factory。Observer。Strategy。

A. 轉義序列。
B. ASCII 碼。
C. 運算符。
D. PHP 標籤。
E. PHP 編譯時配置。
F. 網際網路資源。
G. PHP 風格指南。
索引。