Warenkorb
Kostenloser Versand
Unsere Operationen sind klimaneutral

The PHP Anthology Ben Balbo

The PHP Anthology von Ben Balbo

The PHP Anthology Ben Balbo


€5.69
Zustand - Sehr Gut
Nur noch 2
SerienAnthology

Zusammenfassung

The perfect book for intermediate-to-advanced PHP coders seeking a quick reference guide to common programmers problems. The authors have put together the definitive reference work for PHP professionals featuring best-practice code and a commonsense approach to development.

The PHP Anthology Zusammenfassung

The PHP Anthology: 101 Essential Tips, Tricks and Hacks Ben Balbo

The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition is a collection of powerful PHP 5 solutions to the most common programming problems. Featuring best-practice code and a commonsense approach to development, this book includes coverage of: Manage errors gracefully. Build functional forms, tables, and SEO-friendly URLs. Reduce load time with client- and server-side caching. Produce and utilize web services with XML. Secure your site using access control systems. Easily work with files, emails, and images. And much more The question and answer format will allow you to to quickly find and reference any of the 101 solutions, saving you hours of Internet research or painful trial & error. All solutions are fully explained and the ready-to-use code is available for download. From the Publisher A comprehensive collection of ready-to-use PHP solutions! Over 100 easy-to understand PHP tips, tricks and hacks. Save hours of time with copy and paste ready code. All solutions are fully explained by five PHP gurus. Learn the very latest object oriented PHP techniques. And so much more...Each chapter of this book is laid out in a problem-solution format. We'll start with a common PHP problem that you may face, and then provide a concise solution to that problem. In some cases, when the topic warrants it, we'll give you a brief discussion of the solution to provide context. The chapters are grouped to cover the major areas of PHP. Inside, you'll find solutions to the most common challenges that PHP developers face. What Slashdot.org Says The chapters on error handling and access control are alone worth the price of the book

Inhaltsverzeichnis

0. Preface * Who Should Read this Book? * What s Covered in this Book? * Running the Code Examples * The Book s Web Site o The Code Archive o Updates and Errata * The SitePoint Forums * The SitePoint Newsletters * Your Feedback * Conventions Used in this Book o Code Samples o Tips, Notes, and Warnings 1. Introduction * Where do I get help? * What is OOP? * How do I write portable PHP code? * Summary 2. Using Databases with PDO * What is PDO? * How do I access a database? * How do I fetch data from a table? * How do I resolve errors in my SQL queries? * How do I add data to, or modify data in, my database? * How do I protect my web site from an SQL injection attack? * How do I create flexible SQL statements? * How do I find out how many rows I ve touched? * How do I find out a new INSERT s row number in an autoincrementing field? * How do I search my table? * How do I work with transactions? * How do I use stored procedures with PDO? * How do I back up my database? * Summary 3. Strings * How do I output strings safely? * How do I preserve formatting? * How do I strip HTML tags from text? * How do I force text to wrap after a certain number of characters? * How do I perform advanced search and replace operations? * How do I break up text into an array of lines? * How do I trim whitespace from text? * How do I output formatted text? * How do I validate submitted data? * Summary 4. Dates and Times * How do I use Unix timestamps? * How do I obtain the current date? * How do I find a day of the week? * How do I find the number of days in a month? * How do I create a calendar? * How do I store dates in MySQL? * How do I format MySQL timestamps? * How do I perform date calculations using MySQL? * Summary 5. Forms, Tables, and Pretty URLs * How do I build HTML forms with PHP? * How do I display data in a table? * How do I display data in a sortable table? * How do I create a customized data grid? * How do I make pretty URLs in PHP? * Summary 6. Working with Files * How do I read a local file? * How do I use file handles? * How do I modify a local file? * How do I access information about a local file? * How do I examine directories with PHP? * How do I display PHP source code online? * How do I store configuration information in a file? * How do I access a file on a remote server? * How do I use FTP from PHP? * How do I manage file downloads with PHP? * How do I create compressed ZIP/TAR files with PHP? * How do I work with files using the Standard PHP Library in PHP 5? * Summary 7. Email * How do I send a simple email? * How do I simplify the generation of complex emails? * How do I add attachments to messages? * How do I send HTML email? * How do I mail a message to a group of people? * How do I handle incoming mail with PHP? * How can I protect my site against email injection attacks? * Summary 8. Images * How do I specify the correct image MIME type? * How do I create thumbnail images? * How do I resize images without stretching them? * How can I put together a simple thumbnail gallery? * How do I extract EXIF information from images? * How do I add a watermark to an image? * How do I display charts and graphs with PHP? * How do I prevent the hotlinking of images? * How do I create images that can be verified by humans only? * Summary 9. Error Handling * What error levels does PHP report? * What built-in settings does PHP offer for error handling? * How can I trigger PHP errors? * How do I implement a custom error handler with PHP? * How do I log and report errors? * How can I use PHP exceptions for error handling? * How do I create a custom Exception class? * How do I implement a custom exception handler with PHP? * How can I handle PHP errors as if they were exceptions? * How do I display errors and exceptions gracefully? * How do I redirect users to another page following an error condition? * Summary 10. Access Control * How do I use HTTP authentication? * How do I use sessions? * How do I create a session class? * How do I create a class to control access to a section of the site? * How do I build a registration system? * How do I deal with members who forget their passwords? * How do I let users change their passwords? * How to do I build a permissions system? * How do I store sessions in a database? * Summary 11. Caching * How do I prevent web browsers from caching a page? * How do I control client-side caching? * How do I examine HTTP headers in my browser? * How do I cache file downloads with Internet Explorer? * How do I use output buffering for server-side caching? * How do I cache just the parts of a page that change infrequently? * How do I use PEAR::Cache_Lite for server-side caching? * What configuration options does Cache_Lite support? * How do I purge the Cache_Lite cache? * How do I cache function calls? * Summary 12. XML and Web Services * Which XML technologies are available in PHP 5? * Why should I use PHP s XML extensions instead of PHP string functions? * How do I parse an RSS feed? * How do I generate an RSS feed? * How do I search for a node or content in XML? * How can I consume XML-RPC web services? * How do I serve my own XML-RPC web services? * How can I consume SOAP web services? * How do I serve SOAP web services? * How can I consume REST services? * How can I serve REST services? * Summary 13. Best Practices * How do I track revisions to my project s code? * How can I maintain multiple versions of a single codebase? * How can I write distributable code? * How can I document my code for later reference by myself or others? * How can I ensure future changes to my code won t break current functionality? * How can I determine what remains to be tested? * I ve reviewed some of my old code, and it s horrible. How can I make it better? * How can I deploy code safely? * Summary Appendix 1. PHP Configuration * Configuration Mechanisms * Key Security and Portability Settings * Includes and Execution Settings * Error-related Settings * Miscellaneous Settings 2. Hosting Provider Checklist * General Issues o Does the host support Linux and Apache? o Does the host provide you with SSH access to the server? o Is the host a reseller, or does it maintain servers itself? o To what degree does the host overload the server? o What s the hosting provider s policy on running scripts and programs from the command line? o Does the host provide you access to cron, the Unix utility that allows you to schedule batch jobs? * PHP-related Issues o Can you see the output of phpinfo on the server you will actually be assigned to? o Is PHP installed as an Apache module (not the CGI variant)? o Is the Apache settingAllowOverride set to Options or All? o Is PHP Safe Mode disabled? o Check the upgrade policy of your host. o Ask for a list of installed PHP extensions. o Will PHP be available for use from the command line? o What s the host s knowledge of PHP? * Security Checklist o Top Security Vulnerabilities + Cross-site Scripting (XSS) + Injection Flaws + Malicious File Execution + Insecure Direct Object Reference + Cross-site Request Forgery (CSRF) + Information Leakage and Improper Error Handling + Broken Authentication and Session Management + Insecure Cryptographic Storage + Insecure Communications + Failure to Restrict URL Access o Working with PEAR + Installing PEAR + The PEAR Package Manager + Installing Packages Manually + Alternatives to PEAR o Index

Zusätzliche Informationen

GOR005290136
9780975841990
0975841998
The PHP Anthology: 101 Essential Tips, Tricks and Hacks Ben Balbo
Gebraucht - Sehr Gut
Broschiert
SitePoint Pty Ltd
20071029
520
N/A
Die Abbildung des Buches dient nur Illustrationszwecken, die tatsächliche Bindung, das Cover und die Auflage können sich davon unterscheiden.
Dies ist ein gebrauchtes Buch. Es wurde schon einmal gelesen und weist von der früheren Nutzung Gebrauchsspuren auf. Wir gehen davon aus, dass es im Großen und Ganzen in einem sehr guten Zustand ist. Sollten Sie jedoch nicht vollständig zufrieden sein, setzen Sie sich bitte mit uns in Verbindung.