PHP 7 Solutions: Dynamic Web Design Made Easy, 4/e

Powers, David



Make your websites more dynamic by adding a feedback form, creating a private area where members can upload images that are automatically resized, or perhaps storing all your content in a database in this fourth edition of David Powers' highly-respected PHP Solutions: Dynamic Web Design Made Easy. This examples-laden new edition has been updated by David to incorporate the latest techniques and changes to PHP including the arrival of PHP 7. In this book, new features include the spaceship and null coalesce operators, generators, using array shorthand syntax for list(), array dereferencing, and array unpacking with the splat operator.

The problem is, you're not a programmer and the thought of writing code sends a chill up your spine. Or maybe you've dabbled a bit in PHP and MySQL, but you can't get past baby steps. If this describes you, then you've just found the right book. PHP and the MySQL database are deservedly the most popular combination for creating dynamic websites. They're free, easy to use, and provided by many web hosting companies in their standard packages. This book also covers MariaDB, a seamless replacement for MySQL that has been adopted on many web servers.

Unfortunately, most PHP books either expect you to be an expert already or force you to go through endless exercises of little practical value. In contrast, this book gives you real value right away through a series of practical examples that you can incorporate directly into your sites, optimizing performance and adding functionality such as file uploading, email feedback forms, image galleries, content management systems, and much more. Each solution is created with not only functionality in mind, but also visual design.

But this book doesn't just provide a collection of ready-made scripts: each PHP solution builds on what's gone before, teaching you the basics of PHP and database design quickly and painlessly. By the end of the book, you'll have the confidence to start writing your own scripts or--if you prefer to leave that task to others--to adapt existing scripts to your own requirements. Right from the start, you're shown how easy it is to protect your sites by adopting secure coding practices.

What You Will Learn


  • Design and build dynamic PHP-based web sites and applications
  • Get started right away through practical examples that you can reuse
  • Incorporate PHP 7 elements including arrays
  • Work with the latest PHP 7 techniques, innovations, and best practices


Who This Book Is For

Readers should have at least some prior exposure to web development using PHP.



讓您的網站更具動態性,可以透過添加反饋表單、建立會員可以上傳圖片並自動調整大小的私人區域,或者將所有內容存儲在數據庫中,這是 David Powers 的高度受人尊敬的《PHP解決方案:輕鬆創建動態網頁設計》第四版。這本充滿實例的新版已由 David 更新,以納入最新的 PHP 技術和變化,包括 PHP 7 的到來。本書的新功能包括太空船和空合併運算符、生成器、使用陣列簡寫語法進行列表()、陣列解引用,以及使用展開運算符進行陣列解包。

問題是,您不是一位程式設計師,寫程式碼的想法讓您感到不安。或者您可能稍微涉獵過 PHP 和 MySQL,但無法超越初步階段。如果您符合這種情況,那麼您剛好找到了正確的書籍。PHP 和 MySQL 數據庫理所當然地成為創建動態網站的最受歡迎組合。它們是免費的、易於使用的,並由許多網站託管公司在其標準套餐中提供。本書還介紹了 MariaDB,這是一個無縫替代 MySQL 的解決方案,已經在許多網頁伺服器上得到採用。

不幸的是,大多數 PHP 書籍要麼期望您已經是一位專家,要麼迫使您進行毫無實際價值的無盡練習。相比之下,本書通過一系列實用示例立即為您提供真正的價值,您可以直接將其應用於您的網站中,優化性能並添加功能,例如文件上傳、電子郵件反饋表單、圖片庫、內容管理系統等等。每個解決方案不僅考慮功能,還考慮視覺設計。

但本書不僅僅提供一系列現成的腳本:每個 PHP 解決方案都建立在之前的基礎上,快速而無痛地教授您 PHP 和數據庫設計的基礎知識。通過本書,您將有信心開始編寫自己的腳本,或者如果您更喜歡將此任務交給他人,則可以根據自己的需求適應現有的腳本。從一開始,您就會看到採用安全編碼實踐保護您的網站有多麼容易。


- 設計和構建基於 PHP 的動態網站和應用程式
- 通過可重複使用的實用示例立即入門
- 納入 PHP 7 的元素,包括陣列
- 使用最新的 PHP 7 技術、創新和最佳實踐


讀者應該至少有一些先前的 PHP 網頁開發經驗。


David Powers is an Adobe Community Expert for Dreamweaver and author of a series of highly successful books on PHP, including PHP Solutions: Dynamic Web Design Made Easy and Foundation PHP for Dreamweaver 8. As a professional writer, he has been involved in electronic media for more than 30 years, first with BBC radio and television and more recently with the Internet. His clear writing style is valued not only in the English-speaking world; several of his books have been translated into Spanish and Polish. What started as a mild interest in computing was transformed almost overnight into a passion, when David was posted to Japan in 1987 as BBC correspondent in Tokyo. With no corporate IT department just down the hallway, he was forced to learn how to fix everything himself. When not tinkering with the innards of his computer, he was reporting for BBC television and radio on the rise and collapse of the Japanese bubble economy. Since leaving the BBC to work independently, he has built up an online bilingual database of economic and political analysis for Japanese clients of an international consultancy. When not pounding the keyboard writing books or dreaming of new ways of using PHP and other programming languages, David enjoys nothing better than visiting his favorite sushi restaurant. He has also translated several plays from Japanese.


David Powers是Dreamweaver的Adobe社群專家,也是一系列關於PHP的極受歡迎的書籍的作者,包括《PHP解決方案:輕鬆創建動態網頁設計》和《基礎PHP for Dreamweaver 8》。作為一名專業作家,他在電子媒體領域已經有超過30年的經驗,最初在BBC廣播電視台工作,最近在互聯網領域工作。他的清晰寫作風格不僅在英語世界受到重視,他的幾本書還被翻譯成了西班牙語和波蘭語。在1987年被派往日本擔任BBC東京記者期間,他對計算機的興趣從一個輕微的興趣迅速轉變為熱情。由於沒有公司的IT部門可以幫助他,他被迫學習如何自己修理一切。當他不在修理電腦時,他在BBC電視和廣播上報導日本泡沫經濟的興起和崩潰。自從離開BBC獨立工作以來,他已經為國際咨詢公司的日本客戶建立了一個在線的雙語經濟和政治分析數據庫。當他不在敲打鍵盤寫作書籍或者幻想如何使用PHP和其他編程語言時,David最喜歡的就是去他最喜歡的壽司餐廳用餐。他還翻譯了幾部日本劇本。