| home / programming / phpanth1 / 1 | [previous][next] |
|
|
This chapter provides a summary of all the essentials you need in order to get around quickly in PHP, from how to use the manual, to understanding PHP error messages, and how includes work. There are also some tips for writing portable code, and we’ll take a look at some of the main PHP configuration pitfalls.
The second chapter includes a run-down of PHP’s class syntax, as well as a primer that explains how all the key elements of the Object Oriented Paradigm apply to PHP. It’s essential preparatory reading for later chapters in this anthology.
This chapter provides you with all the essentials of MySQL, PHP’s favorite database. We start with the basics, covering important topics such as how to avoid SQL injection attacks. We then delve more deeply into many lesser known topics, such as MySQL FULLTEXT search facilities, how to repair corrupt tables and back up your database, and how to avoid writing SQL with PEAR::DB_DataObject. This chapter also serves as a “case study” in designing a class to handle connecting to, and the querying of, your MySQL database.
This fourth chapter is a survival guide to working with files in PHP. Here, we’ll cover everything from gaining access to the local file system, to fetching files over a network using PHP’s FTP client. We’ll go on to learn how to create your own zipped archives with PEAR::Archive_Tar.
This chapter covers the essentials of handling content on your site. We’ll discuss string functions you can’t live without, along with the process for validating and filtering user-submitted content. We’ll look at how you can implement a BBCode system, and understand the practicalities involved in preventing cross site scripting exploits.
Here, you’ll learn how to store dates in your database, and how to use PHP’s date functions. We’ll deal with the nuances of handling different time zones, and implement an online calendar. We’ll see how easy it is to run batch jobs on your Website without access to the command line, and learn how to perform simple script performance measurements.
This chapter explores the creation of thumbnails, and how to “watermark” images on your site. We’ll also discuss how you can prevent hot linking from other sites, and produce a few professional charts and graphs with JpGraph.
In this chapter, we deal specifically with email-related solutions, showing you how to take full advantage of email with PHP. We’ll learn to send successfully HTML emails and attachments with help from PHP Mailer, and easily handle incoming mails delivered to your Web server, using PHP.
The essentials of Web pages and navigation, such as tables with PEAR::HTML_Table, are covered here, along with the process for implementing paged result sets. We’ll discuss the development of forms with PEAR::HTML_QuickForm, covering in some depth the handling of file uploads, and the construction of navigation menus. We’ll also take a look at some tricks you can use with Apache to generate search engine friendly URLs.
Understand PHP’s error reporting mechanism, how to take advantage of PHP’s customer error handling features, and how to handle errors gracefully in this action-packed chapter.
Located at http://www.sitepoint.com/books/phpant1/, the Website that supports this book will give you access to the following facilities:
Besides the PHP scripts themselves, the archive contains a number of shared libraries, which are bundled in the SPLIB directory. In order for the scripts that rely on these libraries to work as intended, you’ll need to add this directory to PHP’s include_path (see the section called “How do I include one PHP script in another?” for full details on include_path). Doing this will also make it easier to use these libraries in your own projects.
For full instructions on how to install and use the code archive, consult the readme.txt file in the archive.
In fact, you should join that community even if you don’t want to talk to us, because there are a lot of fun and experienced Web designers and developers hanging out there. It’s a good way to learn new stuff, get questions answered in a hurry, and just have fun.
Particular thanks go to Kevin Yank, whose valuable technical insight and close cooperation throughout the process has tied up many loose ends and helped make The PHP Anthology both readable and accessible. Thanks also to Julian Szemere, whose frequent feedback helped shape the content of this anthology, and to Georgina Laidlaw, who managed to make some of my “late at night” moments more coherent.
A special thanks to the many who contribute to SitePoint Forums. There’s a long list of those who deserve praise for their selflessness in sharing their own practical experience with PHP. It’s been fascinating to watch the PHP forums grow over the last three years, from discussing the basics of PHP’s syntax, to, more recently, the finer points of enterprise application architecture. As a whole, I’m sure SitePoint’s PHP community has made a very significant contribution to making PHP a popular and successful technology.
Finally, returning home, I’d like to thank Natalie, whose patience, love, and understanding throughout continue to amaze me. Halfway through writing this book, our first child, Masha, was born; writing a book at the same time was not always easy.
| home / programming / phpanth1 / 1 | [previous][next] |
Created: March 27, 2003
Revised: January 2, 2004
URL: http://webreference.com/programming/phpanth1