SPECIAL OFFER
Use code BACKTOLEARN during checkout to save 50% on books, eBooks, & videos. Shop now.
Register your product to gain access to bonus material or receive a coupon.
Think of all the things you could do in 24 hours. Go sightseeing. Read a book. Learn PHP. Sams Teach Yourself PHP in 24 Hours is a unique learning tool that is divided into 24 one-hour lessons over five sections. Starting with the basics, you will discover the fundamentals of PHP and how to apply that knowledge to create dynamic websites with forms, cookies and authentication functions. You will also find out how to access databases, as well as how to integrate system components, e-mail, LDAP, network sockets and more. A support website includes access to source code, PHP updates, errata and links to other relevant websites. Sams Teach Yourself PHP in 24 Hours is a quick and easy way to learn how to create interactive websites for your end user.
(NOTE: Each chapter concludes with a Summary. Q&A. Workshop. and Exercise.)
Introduction.
I. GETTING STARTED.
Hour 1. PHP: From Home Page to Web Enterprise.What Is PHP? What Need Does PHP Fulfill? What's New in PHP 5. The Zend Engine. Why Choose PHP? What's New in This Edition.
Hour 2. Installing PHP.Platforms, Servers, Databases, and PHP. Where to Find PHP and More. Installing PHP for Linux and Apache. Some configure Options. Configuring Apache. php.ini. Help!
Hour 3. A First Script.Our First Script. Combining HTML and PHP. Adding Comments to PHP Code.
II. THE LANGUAGE.
Hour 4. The Building Blocks.Variables. Data Types. Operators and Expressions. Constants.
Hour 5. Going with the Flow.Switching Flow. Loops. Code Blocks and Browser Output.
Hour 6. Functions.What Is a Function? Calling Functions. Defining a Function. Returning Values from User-Defined Functions. Dynamic Function Calls. Variable Scope. Saving State Between Function Calls with the static Statement. More About Arguments. Creating Anonymous Functions. Testing for Function Existence.
Hour 7. Arrays.What Is an Array? Creating Arrays. Associative Arrays. Multidimensional Arrays. Accessing Arrays. Manipulating Arrays. Sorting Arrays. Functions Revisited.
Hour 8. Working with Strings.Formatting Strings. Investigating Strings. Manipulating Strings.
Hour 9. Objects.What Is an Object? Creating an Object. Object Properties. Object Methods. Limiting Access to Object Properties. Limiting Access to Object Methods. Constraining Arguments to Methods with Hints. Inheritance. Testing Classes and Objects. Automatically Loading Include Files with __autoload(). Storing and Retrieving Objects.
III. WORKING WITH PHP.
Hour 10. Working with Forms.Superglobal Variables. The $_SERVER Array. A Script to Acquire User Input. Importing User Input into Global Scope. Accessing Form Input with User-Defined Arrays. Combining HTML and PHP Code on a Single Page. Using Hidden Fields to Save State. Redirecting the User. File Upload Forms and Scripts.
Hour 11. Working with Files.Including Files with include(). Using include_once() and include_path to Manage Larger Projects. Testing Files. Creating and Deleting Files. Opening a File for Writing, Reading, or Appending. Reading from Files. Reading the Contents of a File with file_get_contents(). Writing or Appending to a File. Writing Data to a File with file_put_contents(). Working with Directories.
Hour 12. Working with the DBA Functions.Beneath the Abstraction. Opening a Database. Adding Data to the Database. Amending Elements in a Database. Reading from a Database. Determining Whether an Item Exists in a Database. Deleting an Item from a Database. Adding Complex Data Structures to a Database. An Example.
Hour 13. Database Integration-SQL.A (Very) Brief Introduction to SQL. Connecting to the MySQL Database Server. Selecting a Database. Finding Out About Errors. Adding Data to a Table. Acquiring the Value of an Automatically Incremented Field. Accessing Information. Changing Data. SQLite: A Lightweight SQL Engine. Selecting Data. Using the PEAR DB Package.
Hour 14. Beyond the Box.Server Variables Revisited. A Brief Summary of an HTTP Client/Server Negotiation. Getting a Document from a Remote Address. Converting IP Addresses and Hostnames. Making a Network Connection. Sending Mail with the mail() Function. An Introduction to Streams.
Hour 15. Images On-the-Fly.Checking Your Configuration with gd_info(). Creating and Outputting Images. Acquiring Color. Drawing Lines. Applying Color Fills. Drawing an Arc. Drawing a Rectangle. Drawing a Polygon. Making a Color Transparent. Working with Text. Bringing It Together.
Hour 16. Working with Dates and Times.Getting the Date with time(). Converting a Timestamp with getdate(). Converting a Timestamp with date(). Creating Timestamps with mktime(). An Example. A Date Pull-down Library.
Hour 17. Advanced Objects.Objects and Constants. Static Properties. Static Methods. Intercepting Calls to Object Properties and Methods. Final Methods. Cleaning Up Using Destructors. Managing Error Conditions with Exceptions. Tools for Building Object Hierarchies. Passing and Assigning Objects.
Hour 18. Working with Regular Expressions.Perl Compatible Regular Expressions.
Hour 19. Saving State with Cookies and Query Strings.Cookies. Setting a Cookie with PHP. Working with the Query String. Creating a Query String.
Hour 20. Saving State with Session Functions.What Are Session Functions? Starting a Session with session_start(). Working with Session Variables. Destroying Sessions and Unsetting Elements. Passing Session IDs in the Query String. Encoding and Decoding Session Variables.
Hour 21. Working with the Server Environment.Opening Pipes to and from Processes with popen() and proc_open(). Running Commands with exec(). Running External Commands with system() or the Backtick Operator. Plugging Security Holes with escapeshellcmd(). Running External Applications with passthru(). Calling an External CGI Script with the virtual() Function.
Hour 22. XML.What Is XML? XML Parser Functions. An Introduction to the DOM XML Functions. XSL: A Brief Discussion. Introducing SimpleXML.
IV. EXTENDING PHP.
Hour 23. PEAR: Reusable Components to Extend the Power of PHP.What Is PEAR? Some PEAR Packages in Action. PEAR and Your Own Code.
Hour 24. Toward a Framework for Larger Projects.Principles and Problems. The Controller Object. The RequestHelper and DataStore Classes. The CommandFactory Class. The Command Class. The Dispatcher Class. Working with the Framework. Where Now, and Was It Worth It?
Glossary.