PHP & MySQL : Your visual blueprint for creating dynamic , database-driven Web sites (Paperback)
暫譯: PHP 與 MySQL:創建動態資料庫驅動網站的視覺藍圖
Janet Valade
- 出版商: Hungry Minds
- 出版日期: 2006-09-14
- 定價: $1,050
- 售價: 1.9 折 $199
- 語言: 英文
- 頁數: 307
- 裝訂: Paperback
- ISBN: 0470048395
- ISBN-13: 9780470048399
-
相關分類:
MySQL、PHP、SQL、資料庫
立即出貨(限量) (庫存=1)
買這商品的人也買了...
-
$2,390$2,271 -
$990$782 -
$880$748 -
$880$695 -
$880$695 -
$650$514 -
$650$507 -
$850$723 -
$450$356 -
$270$213 -
$760$600 -
$520$411 -
$750$593 -
$680$537 -
$480$379 -
$720$569 -
$550$429 -
$590$466 -
$620$490 -
$680$578 -
$299$236 -
$880$695 -
$780$663 -
$620$527 -
$560$476
商品描述
Description
* Covers all the essentials for adding dynamic content to a site with PHP and linking it to an MySQL database
* Explains more than 125 key tasks, from using cookies to monitor the activity of Web site visitors to retrieving information from MySQL databases, creating images and Web pages on the fly, and processing XML documents
* PHP-Hypertext PreProcessor-open-source scripting language is in use on over 16 million Web sites worldwide; the latest version of MySQL was downloaded more than one million times in the first few weeks of its release
* Companion Web site features a fully searchable e-version of the book, plus all code in the book
Table of Contents
HOW TO USE THIS BOOK.
1 SETTING UP YOUR DEVELOPMENT ENVIRONMENT.
Introducing Dynamic Web Sites.
Set Up Your Development Environment.
Obtain Apache.
Install Apache.
Obtain MySQL.
Install MySQL.
Configure MySQL.
Install MySQL Administration Programs.
Create MySQL Accounts for Use in PHP Scripts.
Obtain PHP.
Install PHP.
Configure Apache to Process PHP Code.
Configure PHP.
Test Your Development Environment.
2 LEARNING PHP BASICS.
How PHP Works.
Add PHP Code to a Web Page File.
Using PHP Statements.
Understanding PHP Output Statements.
Using PHP Variables.
Using PHP Constants.
Work with Numbers.
Work with Character Strings.
Work with Dates and Times.
Modify or Remove Variables.
Using Variable Variables.
Understanding Error Messages.
Add Comments to a Script.
3 USING ARRAYS.
Create an Array.
Modify or Remove an Array.
Get Information about an Array.
Sort an Array.
Walk through an Array with foreach.
Walk through an Array Manually.
Find Values in an Array.
Compare Arrays.
Split and Merge Arrays.
Convert an Array into a String and Vice Versa.
Store a Set of Variables in an Array.
Store Array Elements in Separate Variables.
Create a Multidimensional Array.
Walk through a Multidimensional Array.
Using Built-in PHP Arrays.
4 CONTROLLING THE FLOW OF THE SCRIPT.
Change the Order of Statement Execution.
Check the Contents of a Variable.
Set up Conditions with Comparison Operators.
Introducing Regular Expressions.
Match Character Strings to Patterns Using Regular Expressions.
Join Multiple Comparisons with Logical Operators.
Using an if Statement.
Using a switch Statement.
Using a for Loop.
Using a while Loop.
Using a do-while Loop.
Avoid an Infinite Loop.
Break Out of a Loop.
5 REUSING PHP CODE.
Include a Code File.
Configure the Path to the include Files.
Include Files Automatically.
Store include Files Securely.
Define and Use a Function.
Using Variables in a Function.
Pass Values to a Function.
Return Values from a Function.
6 SOME USEFUL PHP BUILT-IN FUNCTIONS.
Format a Number.
Round a Number.
Find the Largest or Smallest Number.
Remove Leading and Trailing Blank Spaces.
Change the Case of a String.
Format a String.
Count the Characters or Substrings in a String.
Locate a Substring in a String.
Get a Substring.
Find and Replace Substrings.
Add a Substring to a String.
Using Regular Expressions to Replace Text.
Pad or Repeat a String.
Convert a Character to and from an ASCII Value.
Compare Strings.
Convert a String into an Array.
Send an Email Message.
Send an HTTP Header.
Read Configuration Settings.
Set a Local PHP Configuration Option.
7 USING MYSQL DATABASES.
How a MySQL Database Works.
Send a Query with the mysql Client.
Send a Query with the MySQL Query Browser.
Create, Select, or Remove a MySQL Database.
Define a MySQL Table.
Create and Remove a MySQL Table.
Modify the MySQL Table Structure.
Add a Row of Data to a Database.
Add Data from a Text File to a Database.
Store Incremental Values in a Column.
Retrieve Data from a Database.
Limit Query Execution to Specific Rows with a WHERE Clause.
Retrieve Data from Multiple Tables with UNION.
Retrieve Data from Multiple Tables by Joining Tables.
Update Data in a Database.
Remove Data from a Database.
Query a MySQL Database from a PHP Script.
Display Database Data on a Web Page in a PHP Script.
Handle MySQL Errors.
8 ADMINISTERING MYSQL DATABASES.
Understanding MySQL Accounts.
View Existing Accounts.
Create a MySQL Account.
Change the Password of a MySQL Account.
Add and Remove Privileges.
Change the Name of a MySQL Account.
Remove a MySQL Account.
Stop and Start the MySQL Server.
Using MySQL Logs.
Back Up Data.
Restore Data.
Upgrade MySQL.
9 ADDING HTML FORMS TO A WEB PAGE.
Display an HTML Form.
Add a Text Field.
Add a Multiline Text Area.
Add a Hidden Field.
Add a Dynamic Selection List to a Form.
Add a Date Selection List.
Add Dynamic Radio Buttons.
Add Dynamic Check Boxes.
Create One or More Submit Buttons.
Choose the POST or GET Method for a Form.
Create a Form That Uploads a File.
10 PROCESSING DATA FROM FORMS.
Process Information from a Form.
Display Data from a Form.
Display and Process a Form in One Script.
Check for Blank Fields.
Verify Form Data.
Clean Form Data.
Add Form Data to a Database.
Insert Form Data into a Database.
Update or Remove Database Data.
Process an Uploaded File.
11 MANAGING USER SESSIONS.
Understanding User Sessions.
Send a New Web Page to the Browser.
Add Information to a URL.
Store Information in Cookies.
Store Information in a PHP Session.
Using PHP Sessions without Cookies.
12 OBJECT-ORIENTED PROGRAMMING IN PHP.
Understanding Object-Oriented Programming.
Create and Use an Object.
Set Properties in a Class.
Add Methods to a Class.
Write a Constructor or a Destructor Method.
Using PHP Magic Methods to Get or Set Properties.
Using Inheritance in a Class.
Using Exceptions.
Copy and Compare Objects.
Get Information about Objects and Classes.
Using Abstract Classes.
Using Interfaces.
APPENDIX A: PROGRAMMING EDITORS AND IDES FOR PHP.
APPENDIX B: TROUBLESHOOTING TIPS.
INDEX.
商品描述(中文翻譯)
**描述**
* 涵蓋使用 PHP 為網站添加動態內容的所有基本要素,並將其連接到 MySQL 數據庫
* 解釋超過 125 個關鍵任務,從使用 cookies 監控網站訪客的活動到從 MySQL 數據庫檢索信息、即時創建圖像和網頁,以及處理 XML 文檔
* PHP(超文本預處理器)是一種開源腳本語言,全球超過 1600 萬個網站在使用;最新版本的 MySQL 在發布的前幾週內下載次數超過一百萬次
* 附屬網站提供本書的可完全搜索的電子版本,以及書中所有代碼
**目錄**
如何使用本書
1. 設置您的開發環境
- 介紹動態網站
- 設置您的開發環境
- 獲取 Apache
- 安裝 Apache
- 獲取 MySQL
- 安裝 MySQL
- 配置 MySQL
- 安裝 MySQL 管理程序
- 為 PHP 腳本創建 MySQL 帳戶
- 獲取 PHP
- 安裝 PHP
- 配置 Apache 以處理 PHP 代碼
- 配置 PHP
- 測試您的開發環境
2. 學習 PHP 基礎
- PHP 的工作原理
- 將 PHP 代碼添加到網頁文件
- 使用 PHP 語句
- 理解 PHP 輸出語句
- 使用 PHP 變量
- 使用 PHP 常量
- 處理數字
- 處理字符字符串
- 處理日期和時間
- 修改或刪除變量
- 使用變量變量
- 理解錯誤信息
- 在腳本中添加註釋
3. 使用數組
- 創建數組
- 修改或刪除數組
- 獲取有關數組的信息
- 排序數組
- 使用 foreach 遍歷數組
- 手動遍歷數組
- 在數組中查找值
- 比較數組
- 拆分和合併數組
- 將數組轉換為字符串,反之亦然
- 在數組中存儲一組變量
- 將數組元素存儲在單獨的變量中
- 創建多維數組
- 遍歷多維數組
- 使用內建的 PHP 數組
4. 控制腳本的流程
- 改變語句執行的順序
- 檢查變量的內容
- 使用比較運算符設置條件
- 介紹正則表達式
- 使用正則表達式匹配字符字符串與模式
- 使用邏輯運算符連接多個比較
- 使用 if 語句
- 使用 switch 語句
- 使用 for 循環
- 使用 while 循環
- 使用 do-while 循環
- 避免無限循環
- 跳出循環
5. 重用 PHP 代碼
- 包含代碼文件
- 配置包含文件的路徑
- 自動包含文件
- 安全存儲包含文件
- 定義和使用函數
- 在函數中使用變量
- 向函數傳遞值
- 從函數返回值
6. 一些有用的 PHP 內建函數
- 格式化數字
- 四捨五入數字
- 找到最大或最小的數字
- 移除前導和尾隨空格
- 改變字符串的大小寫
- 格式化字符串
- 計算字符串中的字符或子字符串數量
- 在字符串中定位子字符串
- 獲取子字符串
- 查找和替換子字符串
- 將子字符串添加到字符串中
- 使用正則表達式替換文本
- 填充或重複字符串
- 將字符轉換為 ASCII 值及反向轉換
- 比較字符串
- 將字符串轉換為數組
- 發送電子郵件消息
- 發送 HTTP 標頭
- 讀取配置設置
- 設置本地 PHP 配置選項
7. 使用 MySQL 數據庫
- MySQL 數據庫的工作原理
- 使用 mysql 客戶端發送查詢
- 使用 MySQL 查詢瀏覽器發送查詢
- 創建、選擇或刪除 MySQL 數據庫
- 定義 MySQL 表
- 創建和刪除 MySQL 表
- 修改 MySQL 表結構
- 向數據庫添加一行數據
- 從文本文件向數據庫添加數據
- 在列中存儲增量值
- 從數據庫檢索數據
- 使用 WHERE 子句限制查詢執行到特定行
- 使用 UNION 從多個表檢索數據
- 通過連接表從多個表檢索數據
- 更新數據庫中的數據
- 從數據庫中刪除數據
- 從 PHP 腳本查詢 MySQL 數據庫
- 在 PHP 腳本中在網頁上顯示數據庫數據
- 處理 MySQL 錯誤
8. 管理 MySQL 數據庫
- 理解 MySQL 帳戶
- 查看現有帳戶
- 創建 MySQL 帳戶
- 更改 MySQL 帳戶的密碼
- 添加和刪除權限
- 更改 MySQL 帳戶的名稱
- 刪除 MySQL 帳戶
- 停止和啟動 MySQL 伺服器
- 使用 MySQL 日誌
- 備份數據
- 恢復數據
- 升級 MySQL
9. 向網頁添加 HTML 表單
- 顯示 HTML 表單
- 添加文本字段
- 添加多行文本區域
- 添加隱藏字段
- 向表單添加動態選擇列表
- 添加日期選擇列表
- 添加動態單選按鈕
- 添加動態複選框
- 創建一個或多個提交按鈕
- 為表單選擇 POST 或 GET 方法
- 創建一個上傳文件的表單
10. 處理來自表單的數據
- 處理來自表單的信息
- 顯示來自表單的數據
- 在一個腳本中顯示和處理表單
- 檢查空白字段
- 驗證表單數據
- 清理表單數據
- 將表單數據添加到數據庫
- 將表單數據插入數據庫
- 更新或刪除數據庫數據
- 處理上傳的文件
11. 管理用戶會話
- 理解用戶會話
- 向瀏覽器發送新網頁
- 向 URL 添加信息
- 在 cookies 中存儲信息
- 在 PHP 會話中存儲信息
- 在不使用 cookies 的情況下使用 PHP 會話
12. PHP 中的面向對象編程
- 理解面向對象編程
- 創建和使用對象