Apress Pro PHP Programming (2011).pdf

(17755 KB) Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
846855283.031.png 846855283.040.png 846855283.044.png 846855283.045.png 846855283.001.png 846855283.002.png 846855283.003.png 846855283.004.png 846855283.005.png 846855283.006.png 846855283.007.png 846855283.008.png 846855283.009.png
 
 
 
 
 
846855283.010.png 846855283.011.png 846855283.012.png
 
 
 
 
 
 
 
 
846855283.013.png 846855283.014.png 846855283.015.png 846855283.016.png 846855283.017.png 846855283.018.png 846855283.019.png 846855283.020.png 846855283.021.png 846855283.022.png 846855283.023.png 846855283.024.png 846855283.025.png 846855283.026.png 846855283.027.png 846855283.028.png 846855283.029.png 846855283.030.png 846855283.032.png
 
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
846855283.033.png 846855283.034.png
Contents at a Glance
About the Authors.................................................................................................... xiv
About the Technical Reviewer .................................................................................. xv
Foreword ................................................................................................................. xvi
Acknowledgments .................................................................................................. xvii
Introducing PHP..................................................................................................... xviii
Chapter 1: Object Orientation .................................................................................. 1
Chapter 2: Exceptions and References .................................................................. 21
Chapter 3: Mobile PHP........................................................................................... 31
Chapter 4: Social Media......................................................................................... 57
Chapter 5: Cutting Edge ......................................................................................... 93
Chapter 6: Form Design and Management .......................................................... 111
Chapter 7: Database Integration I........................................................................ 127
Chapter 8: Database Integration II....................................................................... 161
Chapter 9: Database Integration III ..................................................................... 189
Chapter 10: Libraries ........................................................................................... 213
Chapter 11: Security............................................................................................ 243
Chapter 12: Agile Development with Zend Studio for Eclipse,
Bugzilla, Mylyn, and Subversion ......................................................................... 263
Chapter 13: Refactoring, Unit Testing, and Continuous Integration .................... 277
iv
846855283.035.png 846855283.036.png 846855283.037.png 846855283.038.png 846855283.039.png
 
CONTENTS AT A GLANCE
Chapter 14: XML .................................................................................................. 323
Chapter 15: JSON and Ajax.................................................................................. 347
Chapter 16: Conclusion........................................................................................ 385
Appendix: Regular Expressions ........................................................................... 391
Index ....................................................................................................................... 403
v
846855283.041.png
Introducing PHP
W elcome to yet another book on the great programming language of PHP. This book is unique in that it
focuses on higher-end materials and more advanced, cutting-edge topics. We have kept it as modern as
possible with the fast-paced world of the Internet. We take the reader from an intermediate level to a
more advanced level of this great programming language.
Origins of PHP
PHP began as a project led and designed by Mr. Rasmus Lerdorf. In June 1995, he released version 1.0 of
Personal Home Page Tools (its original product name). It was a small collection of functions that helped
to automate the creation and maintenance of simple home pages on the then-burgeoning Internet.
Since then, PHP has grown by leaps and bounds to where it is today at version 5.3.4 (at the time of
writing). PHP was one of the first web development programming languages to be open source from the
outset. Lerdorf was visionary enough to see the need and the potential for a tool and language that could
grow with this vein of the Internet community and expand far beyond it as well.
What Is PHP?
So then, what exactly is PHP? What does it look like and “feel” like in its current version? Well, in its
simplest terms, PHP is merely an HTML markup generator. If you look at the source code of a PHP-
generated web page, you will see only HTML tags; maybe some JavaScript as well, but no raw PHP code.
Of course, that is an overly simplistic view of the language that has captured between 35 and 59 percent
(depending on the source) of the languages in use for web development. Whatever number you settle
on, PHP is the single most popular web development language on the market today.
When I use the term “on the market,” you also have to appreciate that PHP is free. Yes, free! It is an
open source product, so in reality there isn’t an actual market for it. So it has done very well in terms of
popularity and range of use for a product that is led and steered by no one entity or personality.
Note For more information on open source, be sure to read “The Cathedral and the Bazaar” by Eric S.
Raymond for comparisons of open source products (Bazaar) and closed source products (Cathedral). You can find
xviii
846855283.042.png 846855283.043.png
 
Zgłoś jeśli naruszono regulamin