معرفی کتاب «The PHP Anthology - Object Oriented PHP Solutions Vol. 1» نوشتهٔ Harry Fuecks; Kevin Yank; Georgina Laidlaw; Julian Carroll، منتشرشده توسط نشر SitePoint Pty در سال 2003. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «The PHP Anthology - Object Oriented PHP Solutions Vol. 1» در دستهٔ بدون دستهبندی قرار دارد.
As a PHP developer, there are certain problems you’re almost guaranteed to face. Generating charts and graphs, converting HTML documents to PDF format—PHP is equipped to handle all of these, but coming up with the best implementation can be tricky! Now, instead of trawling through message boards and mailing lists for the answer, you can just crack open The PHP Anthology! The PHP Anthology is a complete reference guide for any PHP developer --hobbyist or professional-- to help you write better, faster and more secure code that solves common problems. The author, Harry Fuecks, has compiled over 100 best-practice solutions that any developer will find invaluable when building content management systems, intranets, shopping carts or anything else. The first book in The PHP Anthology will show you how to: - write truly portable code - work with PHP’s Object Oriented Programming (OOP) features, without a computer science degree - utilize MySQL’s little-known "FULLTEXT" search facility, repair MySQL tables, backup your database and avoid SQL injection attacks - fetch files over a network using PHP’s FTP features, create zipped archives and gain access to the local file system - validate and filter user submitted content, and avoid cross-site scripting hacks - learn how to produce professional charts and graphs, and create thumbnails and watermark images - send email using PHP, including HTML email with attachments and embedded images - create search engine friendly URLs so your sites can get spidered - create professional error handling routines Cover......Page 1 Summary of Contents......Page 3 The PHP Anthology, Volume I......Page 5 Preface......Page 17 What’s covered in this book?......Page 18 The Code Archive......Page 20 The SitePoint Newsletters......Page 21 Acknowledgements......Page 22 1. PHP Basics......Page 23 Reading the Manual......Page 24 Section II: Language Reference......Page 25 Section IV: Function Reference......Page 26 Further Help......Page 29 How do I fix an error that PHP finds in my script?......Page 30 Syntax Errors......Page 31 Environment Errors......Page 32 Logic Errors......Page 33 Mutual Inclusion......Page 34 Path Finding......Page 37 How do I write portable PHP code?......Page 38 Keep All Configuration Central......Page 39 register_globals off......Page 40 Magic Quotes......Page 41 Write Reusable Code......Page 42 Further Reading......Page 44 2. Object Oriented PHP......Page 45 What are the basics of object oriented PHP?......Page 48 Classes and Objects......Page 51 Understanding Scope......Page 56 A Three Liner......Page 57 How do references work in PHP?......Page 61 What Are References?......Page 62 Using a Reference......Page 64 The Importance of References......Page 65 Good and Bad Practices......Page 68 Performance Issues......Page 69 How do I take advantage of inheritance?......Page 70 Overriding......Page 71 Inheritance in Action......Page 74 Aggregation......Page 78 Composition......Page 80 Spotting the Difference......Page 81 Polymorphism......Page 82 Further Reading......Page 85 3. PHP and MySQL......Page 87 How do I access a MySQL database?......Page 88 A Basic Connection......Page 89 Reusable Code......Page 91 How do I fetch data from a table?......Page 95 Fetching with Classes......Page 97 How do I resolve errors in my SQL queries?......Page 100 How do I add or modify data in my database?......Page 101 Updating a Row......Page 102 Another Class Action......Page 103 The Great Escape......Page 105 SQL Injection Attacks......Page 108 How do I create flexible SQL statements?......Page 109 Counting Rows with PHP......Page 111 Counting Rows with MySQL......Page 112 Row Counting with Classes......Page 114 Counting Affected Rows......Page 115 Class Insert ID......Page 116 Select What You LIKE......Page 117 FULLTEXT Searches......Page 118 How do I back up my database?......Page 120 How do I repair a corrupt table?......Page 125 Do I really need to write SQL?......Page 126 Further Reading......Page 130 Configuration Mechanisms......Page 133 Key Security and Portability Settings......Page 135 Includes and Execution Settings......Page 137 Error-Related Settings......Page 139 Miscellaneous Settings......Page 140 General Issues......Page 141 PHP-Related Issues......Page 143 The Top Security Vulnerabilities......Page 145 Appendix D: Working with PEAR......Page 149 Installing PEAR......Page 150 The PEAR Package Manager......Page 153 Installing Packages Manually......Page 154 Index......Page 157 What’s Next?......Page 171
A compilation of best practice solutions to common Web Development problems in PHP, focusing on the achievement of practical goals by applying well-structured, object orientated software design principles.
Volume 1 covers the foundations of PHP including writing portable and reusable code, storing and extracting data from files, manipulating text, working with email and error handling.
In addition to being an excellent reference with over 60 customizable solutions, the book acts as an excellent primer for Object Orientated Programming. PHP 5 has now been released and has been given significant OOP features, which are a must-learn for PHP Developers.
All code in the book is backwards compatible with earlier versions of PHP.
A compilation of best practice solutions to common Web development problems. It focuses on the achievement of practical goals with minimal effort by applying well-structured object-oriented software design principles. PHP is a programming language that's designed specifically for building Websites, and is both blessed and cursed with being remarkably easy to learn and use.