PHP 5: Your visual blueprint for creating open source, server-side content
暫譯: PHP 5:創建開源伺服器端內容的視覺藍圖
Toby Boudreaux
- 出版商: Hungry Minds
- 出版日期: 2005-05-27
- 售價: $1,200
- 貴賓價: 9.5 折 $1,140
- 語言: 英文
- 頁數: 320
- 裝訂: Paperback
- ISBN: 0764583328
- ISBN-13: 9780764583322
-
相關分類:
PHP
海外代購書籍(需單獨結帳)
買這商品的人也買了...
-
$1,205TCP/IP Illustrated, Volume 1: The Protocols (Hardcover)
-
$800$632 -
$880$695 -
$590$466 -
$2,730$2,594 -
$520$406 -
$540$427 -
$480$379 -
$650$507 -
$2,800$2,660 -
$2,220$2,109 -
$1,540$1,463 -
$2,230$2,119 -
$400$360 -
$620$490 -
$990$842 -
$780$663 -
$680$646 -
$580$458 -
$490$417 -
$490$382 -
$880$695 -
$680$537 -
$650$514 -
$990$891
商品描述
Description:
* Now revised to cover features found in PHP4 and PHP5, this new edition shows Web developers step by step how to create dynamic, data-driven Web applications
* Two-color screen shots accompanied by concise callouts demonstrate how to tackle more than 100 key PHP tasks, including using cookies to monitor the activity of Web site visitors, retrieving information from MySQL or other databases, creating images and Web pages on the fly, and processing XML documents
* Shows how to use PHP with Apache Web server, process data forms, access data files, troubleshoot PHP scripts, and migrate scripts to PHP5
* A companion Web site features a fully searchable e-version of the book, plus all code that appears in the text-ready to plug into users' Web pages
Table of Contents:
HOW TO USE THIS VISUAL BLUEPRINT BOOK.1. GETTING STARTED WITH PHP.
Introduction to PHP.
Install Apache on Windows.
Install Internet Information Services on Windows.
Add a Virtual Directory to Internet Information Services.
Set File and Folder Permissions on Windows.
Install PHP on Windows.
Install Apache on OS X.
Install PHP on OS X.
Set File and Folder Permissions on OS X.
Configure PHP.
Verify Installation.
Upload Pages to a Web Server.
2. PHP LANGUAGE BASICS.
Insert PHP Code into a Page.
Add Comments.
Create a Numeric Variable.
Create a String Variable.
Create a Constant.
Using Operators.
Perform a Numeric Calculation.
Control Program Flow Using Conditional Statements.
Using the Switch Statement.
Using While Loops.
Using For Loops.
Create a Function.
Return a Value from a Function.
Pass Arguments to a Function.
Pass Arguments by Reference.
Write a Recursive Function.
Using Dynamic Variables.
Work with Data Types.
Get Information About a Variable.
Using PHP Constants.
Include a File.
Using the Exit and Die Statements.
Work with Dates and Times.
3. WORKING WITH ARRAYS.
Introduction to Arrays.
Create an Array.
Create an Associative Array.
Create a Multidimensional Array.
Change the Current Array Element.
Add and Remove Elements from an Array.
Replace Elements in an Array.
Sort an Array.
Sort an Associative Array.
Sort Using a Custom Sort Function.
Get Information About an Array.
Using the List Statement.
Using the Foreach Statement.
Print an Array.
4. WORKING WITH TEXT.
Change the Case of a String.
Using ASCII Values.
Print a Formatted String.
Find String Length.
Convert a String into an Array.
Trim a String.
Compare Strings.
Access or Replace Characters by Position in a String.
Search for a Substring or Character.
Extract or Replace a Substring.
Replace All Instances of a Word.
Work with HTML Text.
Work with Unicode Text.
Introduction to Regular Expressions.
Find a Substring Using Regular Expressions.
Replace a Substring Using Regular Expressions.
Reformat a String Using Regular Expressions.
Create an Array of Matches Using Regular Expressions.
5. WORKING WITH FILESYSTEM AND I/O.
Open or Create a File.
Write to a File.
Copy or Delete a File.
Access File Attributes.
Set Unix File Permissions.
Work with Directories.
Get a List of Files in a Directory.
Using Output Buffering.
Set Custom HTTP Headers.
Execute Shell Commands.
Send an E-Mail.
6. WORKING WITH FORMS.
Create a Form.
Understanding Form Elements.
Add Elements to a Form.
Process Submitted Form Data.
Process Multiple Form Selections.
Create a File Upload Form.
Process a File Upload.8
Validate User Input.
7. USING COOKIES AND SESSIONS.
Create and Read a Cookie.
Delete a Cookie.
Create a Session.
Create and Read Session Variables.
Save Session Data to a File.
Access Saved Session Data.
8. INTRODUCTION TO OBJECTS.
Introduction to Object-Oriented Programming.
Changes in PHP 5.
Define a Class.
Create Class Constructors and Destructors.
Define a Method.
Clone an Object.
Create Private and Static Members.
Extend a Class.
Work with External Data in Classes.
Access Information About an Object.
Check for Classes and Methods.
Using Object Serialization.
Using Class Autoloading.
Overload an Object Method.
Using Iterators.
9. INTRODUCTION TO DATABASES.
Introduction to Databases.
Design a Database.
Choose a Database Server.
Introduction to Structured Query Language (SQL).
Using a Database Client.
10. USING DATABASES.
Introduction to SQLite.
Introduction to MySQLi.
Create an SQLite Database.
Add Records to an SQLite Database.
Retrieve Records from an SQLite Database.
Create an SQLite Function.
Connect to MySQL Server.
Add Records to a MySQL Database.
Select Records from a MySQL Database.
Update Records in a MySQL Database.
Delete Records from a MySQL Database.
Retrieve Records as an Associative Array.
Retrieve Records from Multiple Tables in a MySQL Database.
Get Information About Fields in a MySQL Table.
Using a Form to Modify a Record.
Create a MySQLi Connection.
Create a MySQLi Prepared Statement.
11. DEBUGGING AND ERRORS.
Change PHP's Error-Reporting Level.
Create a Custom Error Handler.
Log Errors to a File.
Send Errors to an E-Mail Address.
Embed Debugging Messages in HTML Comments.
Using Try...Catch Statements.
12. WORKING WITH XML.
Introduction to XML.
Introduction to DOM XML.
Parse a File Using SimpleXML.
Write to a File Using SimpleXML.
Parse a File Using SAX.
Parse a File Using DOM.
Write a File Using DOM.
Parse HTML Using DOM.
Using XPath.
Introduction to SOAP.
Introduction to XSLT.
Create a SOAP Client.
Create a SOAP Server.
Transform an XML File Using XSLT.
INDEX.
商品描述(中文翻譯)
**描述:**
* 現在已修訂以涵蓋 PHP4 和 PHP5 中的功能,這本新版本逐步指導網頁開發人員如何創建動態的、數據驅動的網頁應用程式
* 兩色螢幕截圖搭配簡潔的註解,展示如何處理超過 100 個關鍵的 PHP 任務,包括使用 cookies 監控網站訪客的活動、從 MySQL 或其他數據庫檢索信息、即時創建圖像和網頁,以及處理 XML 文件
* 展示如何將 PHP 與 Apache 網頁伺服器一起使用、處理數據表單、訪問數據文件、排除 PHP 腳本的故障,以及將腳本遷移到 PHP5
* 附屬網站提供本書的可完全搜尋的電子版本,以及文本中出現的所有代碼,隨時可以嵌入用戶的網頁中
**目錄:**
**如何使用這本視覺藍圖書。**
**1. 開始使用 PHP。**
介紹 PHP。
在 Windows 上安裝 Apache。
在 Windows 上安裝 Internet Information Services。
為 Internet Information Services 添加虛擬目錄。
在 Windows 上設置文件和文件夾權限。
在 Windows 上安裝 PHP。
在 OS X 上安裝 Apache。
在 OS X 上安裝 PHP。
在 OS X 上設置文件和文件夾權限。
配置 PHP。
驗證安裝。
將頁面上傳到網頁伺服器。
**2. PHP 語言基礎。**
將 PHP 代碼插入頁面。
添加註解。
創建數字變量。
創建字符串變量。
創建常量。
使用運算符。
執行數字計算。
使用條件語句控制程序流程。
使用 Switch 語句。
使用 While 循環。
使用 For 循環。
創建函數。
從函數返回值。
向函數傳遞參數。
按引用傳遞參數。
編寫遞歸函數。
使用動態變量。
處理數據類型。
獲取有關變量的信息。
使用 PHP 常量。
包含文件。
使用 Exit 和 Die 語句。
處理日期和時間。
**3. 操作數組。**
數組介紹。
創建數組。
創建關聯數組。
創建多維數組。
更改當前數組元素。
向數組添加和刪除元素。
替換數組中的元素。
對數組進行排序。
對關聯數組進行排序。
使用自定義排序函數進行排序。
獲取有關數組的信息。
使用 List 語句。
使用 Foreach 語句。
打印數組。
**4. 操作文本。**
更改字符串的大小寫。
使用 ASCII 值。
打印格式化字符串。
查找字符串長度。
將字符串轉換為數組。
修剪字符串。
比較字符串。
按位置訪問或替換字符串中的字符。
搜索子字符串或字符。
提取或替換子字符串。
替換單詞的所有實例。
處理 HTML 文本。
處理 Unicode 文本。
正則表達式介紹。
使用正則表達式查找子字符串。
使用正則表達式替換子字符串。
使用正則表達式重新格式化字符串。
使用正則表達式創建匹配項的數組。
**5. 操作文件系統和 I/O。**
打開或創建文件。
寫入文件。
複製或刪除文件。
訪問文件屬性。
設置 Unix 文件權限。
操作目錄。
獲取目錄中的文件列表。
使用輸出緩衝。
設置自定義 HTTP 標頭。
執行 Shell 命令。
發送電子郵件。
**6. 操作表單。**
創建表單。
理解表單元素。
向表單添加元素。
處理提交的表單數據。
處理多個表單選擇。
創建文件上傳表單。
處理文件上傳。
驗證用戶輸入。
**7. 使用 Cookies 和 Sessions。**
創建和讀取 Cookie。
刪除 Cookie。
創建 Session。
創建和讀取 Session 變量。
將 Session 數據保存到文件。
訪問保存的 Session 數據。
**8. 物件導向介紹。**
物件導向程式設計介紹。
PHP 5 的變更。
定義類。
創建類的構造函數和析構函數。
定義方法。
克隆對象。
創建私有和靜態成員。
擴展類。
在類中處理外部數據。
訪問有關對象的信息。
檢查類和方法。
使用對象序列化。
使用類自動加載。
重載對象方法。
使用迭代器。
**9. 數據庫介紹。**
數據庫介紹。
設計數據庫。
選擇數據庫伺服器。
結構化查詢語言 (SQL) 介紹。
使用數據庫客戶端。
**10. 使用數據庫。**
SQLite 介紹。
MySQLi 介紹。
創建 SQLite 數據庫。
向 SQLite 數據庫添加記錄。
從 SQLite 數據庫檢索記錄。
創建 SQLite 函數。
連接到 MySQL 伺服器。
向 MySQL 數據庫添加記錄。
從 MySQL 數據庫選擇記錄。
更新 MySQL 數據庫中的記錄。
從 MySQL 數據庫刪除記錄。
以關聯數組的形式檢索記錄。
從 MySQL 數據庫中的多個表檢索記錄。
獲取有關 MySQL 表中字段的信息。
使用表單修改記錄。
創建 MySQLi 連接。
創建 MySQLi 預處理語句。
**11. 除錯和錯誤。**
更改 PHP 的錯誤報告級別。
創建自定義錯誤處理程序。
將錯誤記錄到文件。
將錯誤發送到電子郵件地址。
在 HTML 註解中嵌入除錯消息。
使用 Try...Catch 語句。
**12. 操作 XML。**
XML 介紹。
DOM XML 介紹。
使用 SimpleXML 解析文件。
使用 SimpleXML 寫入文件。