SAMS Teach Yourself PHP in 24 Hours 3rd (2004).pdf

(2613 KB) Pobierz
993028701.008.png
Teach Yourself
PHP
in 24
Hours
Matt Zandstra
THIRD EDITION
800 East 96th Sreet, Indianapolis, Indiana 46240
993028701.009.png 993028701.010.png 993028701.011.png 993028701.001.png 993028701.002.png 993028701.003.png 993028701.004.png
 
Sams Teach Yourself PHP in 24 Hours,
Third Edition
Copyright
Acquisitions Editor
Shelley Johnston
2004 by Sams Publishing
All rights reserved. No part of this book shall be reproduced, stored in a
retrieval system, or transmitted by any means, electronic, mechanical,
photocopying, recording, or otherwise, without written permission from
the publisher. No patent liability is assumed with respect to the use of
the information contained herein. Although every precaution has been
taken in the preparation of this book, the publisher and author assume
no responsibility for errors or omissions. Nor is any liability assumed for
damages resulting from the use of the information contained herein.
International Standard Book Number: 0-672-32619-1
Library of Congress Catalog Card Number: 2003109402
Printed in the United States of America
First Printing: December 2003
06
Development Editor
Scott D. Meyers
Managing Editor
Charlotte Clapp
Project Editor
George Nedeff
Production Editor
Megan Wade
Indexer
Heather McNeill
Proofreader
Juli Cook
05
04
03
4321
Trademarks
All terms mentioned in this book that are known to be trademarks or
service marks have been appropriately capitalized. Sams Publishing
cannot attest to the accuracy of this information. Use of a term in this
book should not be regarded as affecting the validity of any trademark
or service mark.
Technical Editors
Steph Fox
Brian France
Sara Goteman
Chris Newman
Team Coordinator
Vanessa Evans
Warning and Disclaimer
Every effort has been made to make this book as complete and as accu-
rate as possible, but no warranty or fitness is implied. The information
provided is on an “as is” basis. The author and the publisher shall have
neither liability nor responsibility to any person or entity with respect to
any loss or damages arising from the information contained in this
book or from the use of the programs accompanying it.
Designer
Gary Adair
Page Layout
Stacey Richwine-DeRome
Bulk Sales
Sams Publishing offers excellent discounts on this book when ordered in
quantity for bulk purchases or special sales. For more information,
please contact:
U.S. Corporate and Government Sales
1-800-382-3419
corpsales@pearsontechgroup.com
For sales outside of the U.S., please contact:
International Sales
+1-317-581-3793
international@pearsontechgroup.com
993028701.005.png
Contents at a Glance
Introduction .............................................................................. 1
Part I: Getting Started
HOUR 1 PHP: From Home Page to Web Enterprise ................................... 7
2 Installing PHP ......................................................................... 13
3 A First Script ........................................................................... 27
Part II: The Language
HOUR 4 The Building Blocks ................................................................. 41
5 Going with the Flow ................................................................ 63
6 Functions ................................................................................ 83
7 Arrays ................................................................................... 107
8 Working with Strings ............................................................. 129
9 Objects .................................................................................. 155
Part III: Working with PHP
HOUR 10 Working with Forms .............................................................. 181
11 Working with Files ................................................................. 203
12 Working with the DBA Functions ........................................... 227
13 Database Integration—SQL ................................................... 245
14 Beyond the Box ..................................................................... 271
15 Images On-the-Fly ................................................................. 295
16 Working with Dates and Times .............................................. 321
17 Advanced Objects .................................................................. 343
18 Working with Regular Expressions ......................................... 369
19 Saving State with Cookies and Query Strings ......................... 389
20 Saving State with Session Functions ....................................... 405
21 Working with the Server Environment ................................... 417
22 XML ...................................................................................... 433
993028701.006.png
Part IV: Extending PHP
HOUR 23 PEAR: Reusable Components to Extend the Power of PHP ....... 459
24 Toward a Framework for Larger Projects ................................ 485
Glossary ................................................................................ 515
Index .................................................................................... 525
993028701.007.png
Zgłoś jeśli naruszono regulamin