PHP Hacks: Tips & Tools For Creating Dynamic Websites (Paperback)
暫譯: PHP 竅門:創建動態網站的技巧與工具 (平裝本)

Jack D. Herrington

  • 出版商: O'Reilly
  • 出版日期: 2006-01-17
  • 定價: $980
  • 售價: 5.0$490
  • 語言: 英文
  • 頁數: 468
  • 裝訂: Paperback
  • ISBN: 0596101392
  • ISBN-13: 9780596101398
  • 相關分類: PHP
  • 立即出貨 (庫存=1)

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

相關主題

商品描述

Description

Programmers love its flexibility and speed; designers love its accessibility and convenience. When it comes to creating web sites, the PHP scripting language is truly a red-hot property. In fact, PHP is currently used on more than 19 million web sites, surpassing Microsoft's ASP .NET technology in popularity. Not surprisingly, this surge in usage has resulted in a number of PHP books hitting the market. Only one, though, takes the language beyond traditional Web programming and into mapping, graphing, multimedia, and beyond: PHP Hacks.


In PHP Hacks, author Jack Herrington wrings out his 20 years of code generation experience to deliver hands-on tools ranging from basic PHP and PEAR installation and scripting to advanced multimedia and database optimizing tricks.


On the practical side of things, PHP Hacks helps you develop more robust PHP applications by explaining how to improve your database design, automate application testing, and employ design patterns in your PHP scripts and classes. In the category of "cool," Herrington explains how to upgrade your Web interface through the creation of tabs, stickies, popups, and calendars. He even examines how to leverage maps and graphics in PHP. There's also a bounty of image and application hacks, including those that show you how to:


  • Integrate web sites with Google maps and satellite imaging
  • Dynamically display iPhoto libraries online
  • Add IRC, SMS, and Instant Messaging capabilities to your Web applications
  • Drop the latest Wikipedia dictionary onto your Sony PSP
  • Render graphics and user interfaces with SVG, DHTML, and Ajax

Table of Contents

Credits  

Preface  

Chapter 1. Installation and Basics 

      1. Install PHP  

      2. Install PEAR Modules  

Chapter 2. Web Design 

      3. Create a Skinnable Interface  

      4. Build a Breadcrumb Trail  

      5. Create HTML Boxes  

      6. Add Tabs to Your Web Interface  

      7. Give Your Customers Formatting Control with XSL  

      8. Build Lightweight HTML Graphs  

      9. Properly Size Image Tags  

      10. Send HTML Email  

Chapter 3. DHTML 

      11. Put an Interactive Spreadsheet on Your Page  

      12. Create Pop-Up Hints  

      13. Create Drag-and-Drop Lists  

      14. Build Dynamic HTML Graphs  

      15. Section Your Content with Spinners  

      16. Create Drop-Down Stickies  

      17. Create Dynamic Navigation Menus  

      18. Obscure JavaScript Dynamically  

      19. Build a DHTML Binary Clock  

      20. Tame Ajax with JSON  

      21. Make a DHTML Slideshow  

      22. Add Vector Graphics with PHP  

      23. Build a Color Selector  

      24. Create Link Graphs  

      25. Create an Interactive Calendar  

      26. Create the Google Maps Scrolling Effect  

Chapter 4. Graphics 

      27. Create Thumbnail Images  

      28. Create Beautiful Graphics with SVG  

      29. Simplify Your Graphics with Objects  

      30. Split One Image into Multiple Images  

      31. Create Graphs with PHP  

      32. Create Image Overlays  

      33. Access Your iPhoto Pictures with PHP  

Chapter 5. Databases and XML 

      34. Design Better SQL Schemas  

      35. Create Bulletproof Database Access  

      36. Create Dynamic Database Access Objects  

      37. Generate CRUD Database Code  

      38. Read XML on the Cheap with Regular Expressions  

      39. Export Database Schema as XML  

      40. Create a Simple XML Query Handler for Database Access  

      41. Generate Database SQL  

      42. Generate Database Select Code  

      43. Convert CSV to PHP  

      44. Scrape Web Pages for Data  

      45. Suck Data from Excel Uploads  

      46. Load Your Database from Excel  

      47. Search Microsoft Word Documents  

      48. Create RTF Documents Dynamically  

      49. Create Excel Spreadsheets Dynamically  

      50. Create a Message Queue  

Chapter 6. Application Design 

      51. Create Modular Interfaces  

      52. Support Wiki Text  

      53. Turn Any Object into an Array  

      54. Create XML the Right Way  

      55. Fix the Double Submit Problem  

      56. Create User-Customizable Reports  

      57. Create a Login System  

      58. Apply Security by Role  

      59. Migrate to MD5 Passwords  

      60. Make Usable URLs with mod_rewrite  

      61. Build an Ad Redirector  

      62. Add a Buy Now Button  

      63. Find Out Where Your Guests Are Coming From  

      64. Import Information from vCards  

      65. Create vCard Files from Your Application's Data  

      66. Create a Shopping Cart  

Chapter 7. Patterns 

      67. Observe Your Objects  

      68. Create Objects with Abstract Factories  

      69. Flexible Object Creation with Factory Methods  

      70. Abstract Construction Code with a Builder  

      71. Separate What from How with Strategies  

      72. Link Up Two Modules with an Adapter  

      73. Write Portable Code with Bridges  

      74. Build Extensible Processing with Chains  

      75. Break Up Big Classes with Composites  

      76. Simplify APIs Using a Fa蓷de  

      77. Create Constant Objects with Singletons  

      78. Ease Data Manipulation with Visitors  

Chapter 8. Testing 

      79. Test Your Code with Unit Tests  

      80. Generate Your Unit Tests  

      81. Check for Broken Links  

      82. Test Your Application with Simulated Users  

      83. Test Your Application with Robots  

      84. Spider Your Site  

      85. Generate Documentation Automatically  

Chapter 9. Alternative UIs 

      86. Create Custom Maps with MapServer  

      87. Build GUI Interfaces with GTk  

      88. Send RSS Feeds to Your IM Application Using Jabber  

      89. IRC Your Web Application  

      90. Read RSS Feeds on Your PSP  

      91. Search Google by Link Graph  

      92. Create a New Interface for Amazon.com  

      93. Send SMS Messages from Your IM Client  

      94. Generate Flash Movies on the Fly  

Chapter 10. Fun Stuff 

      95. Create Custom Google Maps  

      96. Create Dynamic Playlists  

      97. Create a Media Upload/Download Center  

      98. Check Your Network Game with PHP  

      99. Put Wikipedia on Your PSP  

      100. Create a Weather Showdown  

Index  

商品描述(中文翻譯)

描述
程序員喜愛其靈活性和速度;設計師則喜愛其可及性和便利性。在創建網站方面,PHP 腳本語言確實是一個炙手可熱的技術。事實上,PHP 目前被用於超過 1900 萬個網站,超越了微軟的 ASP .NET 技術,成為更受歡迎的選擇。不出所料,這一使用量的激增導致了許多 PHP 書籍的問世。然而,只有一本書將這門語言推向了傳統網頁編程之外,進入了地圖、圖形、多媒體等領域:《PHP Hacks》。
在《PHP Hacks》中,作者 Jack Herrington 利用他 20 年的代碼生成經驗,提供從基本的 PHP 和 PEAR 安裝及腳本到高級多媒體和數據庫優化技巧的實用工具。
在實用方面,《PHP Hacks》幫助您開發更穩健的 PHP 應用程序,通過解釋如何改善數據庫設計、自動化應用測試以及在 PHP 腳本和類中使用設計模式來實現。關於「酷」的部分,Herrington 解釋了如何通過創建選項卡、便條、彈出窗口和日曆來升級您的網頁介面。他甚至探討了如何在 PHP 中利用地圖和圖形。還有大量的圖像和應用技巧,包括教您如何:
- 將網站與 Google 地圖和衛星影像整合
- 動態顯示 iPhoto 資料庫在線
- 為您的網頁應用添加 IRC、SMS 和即時消息功能
- 將最新的維基百科字典放到您的 Sony PSP 上
- 使用 SVG、DHTML 和 Ajax 渲染圖形和用戶介面

目錄
- 版權
- 前言
- 第 1 章 安裝與基礎
1. 安裝 PHP
2. 安裝 PEAR 模組
- 第 2 章 網頁設計
3. 創建可皮膚化的介面
4. 建立麵包屑導航
5. 創建 HTML 方塊
6. 為您的網頁介面添加選項卡
7. 讓您的客戶使用 XSL 控制格式
8. 建立輕量級 HTML 圖表
9. 正確調整圖像標籤大小
10. 發送 HTML 郵件
- 第 3 章 DHTML
11. 在您的頁面上放置互動式電子表格
12. 創建彈出提示
13. 創建拖放列表
14. 建立動態 HTML 圖表
15. 使用旋轉器分隔內容
16. 創建下拉便條
17. 創建動態導航菜單
18. 動態隱藏 JavaScript
19. 建立 DHTML 二進位時鐘
20. 使用 JSON 駕馭 Ajax
21. 創建 DHTML 幻燈片
22. 使用 PHP 添加向量圖形
23. 建立顏色選擇器
24. 創建連結圖
25. 創建互動式日曆
26. 創建 Google 地圖滾動效果
- 第 4 章 圖形
27. 創建縮略圖
28. 使用 SVG 創建美麗的圖形
29. 使用物件簡化圖形
30. 將一個圖像拆分為多個圖像
31. 使用 PHP 創建圖表
32. 創建圖像覆蓋
33. 使用 PHP 訪問您的 iPhoto 圖片
- 第 5 章 數據庫與 XML
34. 設計更好的 SQL 架構
35. 創建防彈的數據庫訪問
36. 創建動態數據庫訪問物件
37. 生成 CRUD 數據庫代碼
38. 使用正則表達式便宜地讀取 XML
39. 將數據庫架構導出為 XML
40. 創建簡單的 XML 查詢處理器以訪問數據庫
41. 生成數據庫 SQL
42. 生成數據庫選擇代碼
43. 將 CSV 轉換為 PHP
44. 從網頁抓取數據
45. 從 Excel 上傳中提取數據
46. 從 Excel 加載您的數據庫
47. 搜索 Microsoft Word 文檔
48. 動態創建 RTF 文檔
49. 動態創建 Excel 試算表
50. 創建消息隊列
- 第 6 章 應用設計
51. 創建模組化介面
52. 支持 Wiki 文本
53. 將任何物件轉換為數組
54. 正確創建 XML
55. 修復雙重提交問題
56. 創建用戶可自定義的報告
57. 創建登錄系統
58. 按角色應用安全性
59. 遷移到 MD5 密碼
60. 使用 mod_rewrite 創建可用的 URL
61. 建立廣告重定向器
62. 添加立即購買按鈕
63. 找出您的訪客來自哪裡
64. 從 vCard 導入信息
65. 從應用程序數據創建 vCard 文件
66. 創建購物車
- 第 7 章 模式
67. 觀察您的物件
68. 使用抽象工廠創建物件
69. 使用工廠方法靈活創建物件
70. 使用建造者抽象構建代碼
71. 使用策略分隔「做什麼」與「怎麼做」
72. 使用適配器連接兩個模組
73. 使用橋接編寫可攜帶的代碼
74. 使用鏈構建可擴展的處理
75. 使用組合拆分大型類
76. 使用外觀簡化 API
77. 使用單例創建常量物件
78. 使用訪問者簡化數據操作
- 第 8 章 測試
79. 使用單元測試測試您的代碼
80. 生成您的單元測試
81. 檢查斷開的連結
82. 使用模擬用戶測試您的應用
83. 使用機器人測試您的應用
84. 爬行您的網站
85. 自動生成文檔
- 第 9 章 替代用戶介面
86. 使用 MapServer 創建自定義地圖
87. 使用 GTk 構建 GUI 介面
88. 使用 Jabber 將 RSS 提要發送到您的 IM 應用
89. 將您的網頁應用 IRC 化
90. 在您的 PSP 上閱讀 RSS 提要
91. 通過連結圖搜索 Google
92. 為 Amazon.com 創建新介面
93. 從您的 IM 客戶端發送 SMS 消息
94. 動態生成 Flash 動畫
- 第 10 章 趣味內容
95. 創建自定義 Google 地圖
96. 創建動態播放列表
97. 創建媒體上傳/下載中心
98. 使用 PHP 檢查您的網絡遊戲
99. 將維基百科放到您的 PSP 上
100. 創建天氣對決
- 索引