
PHP in a Nutshell
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Table of Contents
- Preface
- Audience
- Assumptions
- Contents of This Book
- Conventions Used in This Book
- Using Code Examples
- Safari® Enabled
- How to Contact Us
- Acknowledgments
- Introduction to PHP
- PHP History
- Advantages of PHP
- The HTML Relationship
- Interpreting Versus Compiling
- Output Control
- Performance
- Getting Help
- The Documentation
- Mailing Lists
- IRC
- Conferences
- User Groups
- Submitting a Bug
- Getting Certified
- PHP Resources
- Books
- Magazines
- Web Sites
- Installing PHP
- Installing on Windows
- Installing Apache
- Installing Microsoft IIS
- Configuring Extensions
- Installing on Unix
- Installing Using Packages
- Compiling from Source
- Configuring Extensions
- Testing Your Configuration
- System Configuration
- The PHP Interpreter
- Running PHP Scripts
- Extending PHP
- PEAR
- Abnormal Script Termination
- The PHP Language
- The Basics of PHP
- Variables
- Whitespace
- Heredoc
- Brief Introduction to Variable Types
- Code Blocks
- Opening and Closing Code Islands
- Comments
- Conditional Statements
- Case Switching
- Loops
- Infinite Loops
- Special Loop Keywords
- Loops Within Loops
- Mixed-Mode Processing
- Including Other Files
- Functions
- A Simple User Function
- Return Values
- Parameters
- Passing By Reference
- Returning by Reference
- Default Parameters
- Variable Parameter Counts
- Variable Scope in Functions
- Overriding Scope with the GLOBALS Array
- Recursive Functions
- Variables and Constants
- Types of Data
- True or False
- Strings
- Escape Sequences
- Integers
- Floats
- Automatic Type Conversion
- Checking Whether a Variable Is Set: isset( )
- Variable Scope
- Variable Variables
- Superglobals
- Using $_ENV and $_SERVER
- References
- Constants
- Preset Constants
- Mathematical Constants
- Arrays
- First Steps
- Associative Arrays
- The Array Operator
- Returning Arrays from Functions
- Array-Specific Functions
- array_diff( )
- array_filter( )
- array_flip( )
- array_intersect( )
- array_keys( )
- array_merge( )
- array_pop( )
- array_push( )
- array_rand( )
- array_shift( )
- array_unique( )
- array_unshift( )
- array_values( )
- arsort( )
- asort( )
- explode( )
- extract( )
- implode( )
- in_array( )
- krsort( )
- ksort( )
- range( )
- shuffle( )
- Multidimensional Arrays
- The Array Cursor
- Holes in Arrays
- Using Arrays in Strings
- Saving Arrays
- Operators
- Arithmetic Operators
- Assignment Operators
- String Operators
- Bitwise Operators
- Comparison Operators
- Incrementing and Decrementing Operators
- Logical Operators
- Some Operator Examples
- The Ternary Operator
- The Execution Operator
- Operator Precedence and Associativity
- Function Reference
- Undocumented Functions
- Handling Non-English Characters
- abs( )
- acos( )
- addslashes( )
- asin( )
- atan( )
- base_convert( )
- bindec( )
- call_user_func( )
- call_user_func_array( )
- ceil( )
- chr( )
- connection_status( )
- cos( )
- count_chars( )
- date( )
- decbin( )
- dechex( )
- decoct( )
- deg2rad( )
- die( )
- dl( )
- empty( )
- escapeshellcmd( )
- eval( )
- exec( )
- exit( )
- floor( )
- function_exists( )
- get_extension_funcs( )
- get_loaded_extensions( )
- hexdec( )
- html_entities( )
- html_entity_decode( )
- ignore_user_abort( )
- ini_get( )
- ini_set( )
- is_callable( )
- isset( )
- ltrim( )
- md5( )
- microtime( )
- mktime( )
- mt_rand( )
- nl2br( )
- number_format( )
- octdec( )
- ord( )
- parse_str( )
- passthru( )
- pow( )
- printf( )
- rad2deg( )
- rand( )
- rawurldecode( )
- rawurlencode( )
- register_shutdown_function( )
- round( )
- rtrim( )
- set_time_limit( )
- sha1( )
- sin( )
- sleep( )
- sqrt( )
- str_pad( )
- str_replace( )
- str_word_count( )
- strcasecmp( )
- strcmp( )
- strip_tags( )
- stripslashes( )
- strlen( )
- strpos( )
- strstr( )
- strtolower( )
- strtotime( )
- strtoupper( )
- substr( )
- tan( )
- time( )
- trim( )
- ucfirst( )
- ucwords( )
- unset( )
- usleep( )
- virtual( )
- wordwrap( )
- Object-Oriented PHP
- Conceptual Overview
- Classes
- Defining a Class
- How to Design Your Class
- Basic Inheritance
- Overriding Methods
- The Scope Resolution Operator
- Objects
- Properties
- The 'this' Variable
- Objects Within Objects
- Access Control Modifiers
- Public
- Private
- Protected
- Final
- Abstract
- Iterating Through Object Properties
- Object Type Information
- Class Type Hints
- Constructors and Destructors
- Parent Constructors
- Destructors
- Deleting Objects
- Copying Objects
- Comparing Objects with == and ===
- Saving Objects
- Magic Methods
- _ _autoload( )
- _ _get( )
- _ _set( )
- _ _call( )
- _ _toString( )
- Static Class Methods and Properties
- Helpful Utility Functions
- Interfaces
- Dereferencing Object Return Values
- HTML Forms
- What Does It Mean to Be Dynamic?
- Designing a Form
- GET and POST
- Available Elements
- A Working Form
- Handling Data
- register_globals
- Working Around register_globals
- Magic Quotes
- Handling Our Form
- Splitting Forms Across Pages
- Validating Input
- Form Design
- Summary
- Cookies and Sessions
- Cookies Versus Sessions
- Using Cookies
- Using Sessions
- Starting a Session
- Adding Session Data
- Reading Session Data
- Removing Session Data
- Ending a Session
- Checking Session Data
- Files Versus Databases
- Storing Complex Data Types
- Output Buffering
- Why Use Output Buffering?
- Getting Started
- Reusing Buffers
- Stacking Buffers
- Flushing Stacked Buffers
- Reading Buffers
- Other OB Functions
- Flushing Output
- Compressing Output
- URL Rewriting
- Security
- Security Tips
- Put Key Files Outside Your Document Root
- Remember That Most Files Are Public
- Hide Your Identity
- Hiding PHP
- Encryption
- Encrypting Data
- Symmetric Decryption
- Files
- Reading Files
- readfile( )
- file_get_contents( ) and file( )
- fopen( ) and fread( )
- Reading by line using fgets( )
- Creating and Changing Files
- file_put_contents( )
- fwrite( )
- Moving, Copying, and Deleting Files
- Moving Files with rename( )
- Copying Files with copy( )
- Deleting Files with unlink( )
- Other File Functions
- Checking Whether a File Exists
- Retrieving File Time Information
- Dissecting Filename Information
- Handling File Uploads
- Checking Uploaded Files
- Locking Files with flock( )
- Reading File Permissions and Status
- Changing File Permissions and Ownership
- Working with Links
- Working with Directories
- Creating Directories
- Deleting Directories
- Reading and Changing the Working Directory
- One Last Directory Function
- Remote Files
- File Checksums
- Parsing a Configuration File
- Databases
- Using MySQL with PHP
- Connecting to a MySQL Database
- Querying and Formatting
- Disconnecting from a MySQL Database
- Reading in Data
- Mixing in PHP Variables
- Reading Auto-Incrementing Values
- Unbuffered Queries for Large Data Sets
- PEAR::DB
- Quick PEAR::DB Calls
- Query Information
- Advanced PEAR::DB: Prepared Statements
- SQLite
- Before You Begin
- Getting Started
- Advanced Functions
- Mixing SQLite and PHP
- Persistent Connections
- MySQL Improved
- Regular Expressions
- Basic Regexps with preg_match( ) and preg_match_all( )
- Regexp Character Classes
- Regexp Special Characters
- Words and Whitespace Regexps
- Storing Matched Strings
- Regular Expression Replacements
- Regular Expression Syntax Examples
- The Regular Expressions Coach
- Manipulating Images
- Getting Started
- Choosing a Format
- Getting Arty
- More Shapes
- Complex Shapes
- Outputting Text
- Loading Existing Images
- Color and Image Fills
- Adding Transparency
- Using Brushes
- Basic Image Copying
- Scaling and Rotating
- Points and Lines
- Special Effects Using imagefilter( )
- Interlacing an Image
- Getting an Image's MIME Type
- Creating PDFs
- Getting Started
- Adding More Pages and More Style
- Adding Images
- PDF Special Effects
- Adding Document Data
- Creating Flash
- A Simple Movie
- Flash Text
- Actions
- Animation
- XML & XSLT
- SimpleXML
- XML Attributes
- Reading from a String
- Searching and Filtering with XPath
- Outputting XML
- Transforming XML Using XSLT
- An Example XSL Document
- Adding PHP to the Mix
- Network Programming
- Sockets
- Sockets Are Files
- Creating a Server
- HTTP
- Sending Custom Headers
- Reading Queued Headers
- Authentication Over HTTP
- Sending Mail
- MIME Types
- Easier Mail Sending with PEAR::Mail
- Sending Mixed-Type Messages with PEAR::Mail_Mime
- Sending Real Attachments
- Curl
- Installing Curl
- Your First Curl Script
- Trapping Return Values
- Using FTP to Send Data
- Sending Data Over HTTP
- The Abridged List of Curl Options
- Debugging Curl
- Distributing Your Code
- Cross-Platform Code 1: Loading Extensions
- Cross-Platform Code 2: Using Extensions
- Cross-Platform Code 3: Path and Line Separators
- Cross-Platform Code 4: Coping with php.ini Differences
- Cross-Platform Code 5: Checking the PHP Version with phpversion( ) and version_compare( )
- Debugging
- The Most Basic Debugging Technique
- Making Assertions
- Triggering Your Own Errors
- Testing with php_check_syntax( )
- Source Highlighting
- Handling MySQL Errors
- Exception Handling
- Backtracing Your Code
- Custom Error Handlers
- Custom Exception Handlers
- Using @ to Disable Errors
- phpinfo( )
- Output Style
- Installing Tidy
- Performance
- Write Your Code Sensibly
- Use the Zend Optimizer
- Use a PHP Code Cache
- Compress Your Output
- Don't Use CGI
- Debug Your Code
- Use Persistent Connections
- Compile Right
- Index
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.