Beginning PHP 5.3

Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: Doyle, Matt (VerfasserIn)
Format: Buch
Sprache:English
Veröffentlicht: Indianapolis, IN Wiley 2010
Schriftenreihe:Wrox programmer to programmer
Schlagworte:
Online-Zugang:Inhaltsverzeichnis
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!

MARC

LEADER 00000nam a2200000zc 4500
001 BV036616981
003 DE-604
005 20100824
007 t|
008 100816s2010 xxu |||| 00||| eng d
010 |a 2009017149 
020 |a 9780470413968  |c paper/website  |9 978-0-470-41396-8 
035 |a (OCoLC)698972589 
035 |a (DE-599)BVBBV036616981 
040 |a DE-604  |b ger  |e aacr 
041 0 |a eng 
044 |a xxu  |c US 
049 |a DE-Aug4  |a DE-20  |a DE-11  |a DE-523 
050 0 |a TK5105.525 
082 0 |a 006.7/6 
084 |a ST 250  |0 (DE-625)143626:  |2 rvk 
100 1 |a Doyle, Matt  |e Verfasser  |4 aut 
245 1 0 |a Beginning PHP 5.3  |c Matt Doyle 
264 1 |a Indianapolis, IN  |b Wiley  |c 2010 
300 |a XXXIII, 801 S. 
336 |b txt  |2 rdacontent 
337 |b n  |2 rdamedia 
338 |b nc  |2 rdacarrier 
490 0 |a Wrox programmer to programmer 
500 |a Includes index. 
650 4 |a Peer-to-peer architecture (Computer networks) 
650 0 7 |a PHP 5.3  |0 (DE-588)7638375-1  |2 gnd  |9 rswk-swf 
689 0 0 |a PHP 5.3  |0 (DE-588)7638375-1  |D s 
689 0 |5 DE-604 
856 4 2 |m HBZ Datenaustausch  |q application/pdf  |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=020537097&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA  |3 Inhaltsverzeichnis 
943 1 |a oai:aleph.bib-bvb.de:BVB01-020537097 

Datensatz im Suchindex

_version_ 1819786973696491520
adam_text Titel: Beginning PHP 5.3 Autor: Doyle, Matt Jahr: 2010 Contents Introduction xxvii Part I: Getting Up and Running with PHP Chapter 1: Introducing PHP_________________________________________________3 What Is PHP? 3 Why Use PHP? 5 The Evolution of PHP 7 What s New in PHP 5.3 7 Namespaces 7 The goto Operator 8 Nowdoc Syntax 8 Shorthand Form of the Ternary Operator 8 Advanced Changes 9 Summary 9 Chapter 2: Your First PHP Script___________________________________________11 Installing PHP 12 Installing on Ubuntu Linux 12 Installing on Windows 15 Installing on Mac OS X 17 Testing Your Installation 19 Setting Your Time Zone 21 Other Ways to Run PHP 22 Running PHP with other Web Servers 23 Compiling PHP Yourself 23 Running PHP Remotely 24 Creating Your First Script 24 Embedding PHP within HTML 25 Enhancing the Script Further 28 Using Comments to Make Code More Readable 29 Summary 30 Exercise 30 Part II: Learning the Language Chapter 3: PHP Language Basics____________________________________33 Using Variables in PHP 33 Naming Variables 34 Creating Variables 34 Understanding Data Types 35 About Loose Typing 36 Testing the Type of a Variable 36 Changing a Variable s Data Type 38 Changing Type by Casting 38 Operators and Expressions 40 Operator Types 40 Understanding Operator Precedence 47 Constants 48 Summary 50 Exercises 50 Chapter 4: Decisions and Loops_____________ 51 Making Decisions Simple Decisions with the if Statement ,,?. Providing an Alternative Choice with the else Statement 54 Testing One Expression Many Times with the switch Statement 55 Compact Coding with the Ternary Operator Doing Repetitive Tasks with Looping Simple Looping with the while Statement Testing at the End: The do . . . while Loop Neater Looping with the for Statement Escaping from Loops with the break Statement Skipping Loop Iterations with the continue Statement 64 Creating Nested Loops fi[- Mixing Decisions and Looping with HTML 70 Summary __ Exercises __ Chapter 5: Strings 52 52 56 59 59 60 61 64 73 74 Creating and Accessing Strings Including More Complex Expressions within Strings Using Your Own Delimiters 75 76 Other Ways to Create Strings 77 Finding the Length of a String 77 Accessing Characters within a String 78 Searching Strings 78 Searching Strings with strstr() 79 Locating Text with strposQ and strrposQ 79 Finding the Number of Occurrences with substr_count() 80 Searching for a Set of Characters with strpbrk() 81 Replacing Text within Strings 81 Replacing All Occurrences using str_replace() 81 Replacing a Portion of a String with substr_replace() 82 Translating Characters with strtr() 87 Dealing with Upper- and Lowercase 87 Formatting Strings 89 General-Purpose Formatting with printf() and sprintf() 89 Trimming Strings with trim(), ltrim(), and rtrim() 95 Padding Strings with str_pad() 96 Wrapping Lines of Text with wordwrapQ 96 Formatting Numbers with number_format() 98 Summary 99 Exercises 100 Chapter 6: Arrays________________________________________________________101 The Anatomy of an Array 102 Creating Arrays 102 Accessing Array Elements 103 Changing Elements 104 Outputting an Entire Array with print_r() 105 Extracting a Range of Elements with array_slice() 107 Counting Elements in an Array 108 Stepping Through an Array 109 Looping Through Arrays with foreach 113 Using foreach to Loop Through Values 114 Using foreach to Loop Through Keys and Values 114 Altering Array Values with foreach 115 Working with Multidimensional Arrays 116 Creating a Multidimensional Array 117 Accessing Elements of Multidimensional Arrays 118 Looping Through Multidimensional Arrays 119 Manipulating Arrays 121 Sorting Arrays 121 Adding and Removing Array Elements 128 Merging Arrays Together 134 Converting Between Arrays and Strings 136 Converting an Array to a List of Variables 137 Summary 138 Exercises 139 Chapter 7: Functions____________________________________ 141 What Is a Function? 141 Why Functions Are Useful 142 Calling Functions 142 Working with Variable Functions 144 Writing Your Own Functions 145 Defining Parameters ^45 Optional Parameters and Default Values .^47 Returning Values from Your Functions ^4g Understanding Variable Scope - ca Creating Anonymous Functions ^54 Working with References 158 Passing References to Your Own Functions 15Q Returning References from Your Own Functions 1 - n Writing Recursive Functions ? eft _ xdu Summary 16_ Exercises ?_. 164 Chapter 8: Objects ? ._ -----------------------------------------------------------------------¦----____________^_____loo What Is Object-Oriented Programming? Advantages of OOP ~ Understanding Basic OOP Concepts j-6® Classes Objects 167 Properties Methods 168 Creating Classes and Objects in PHP 168 Creating and Using Properties 168 Understanding Property Visibility ***9 Declaring Properties 169 Accessing Properties 170 170 Static Properties 172 Class Constants 173 Working with Methods 174 Method Visibility 174 Creating a Method 174 Calling Methods 175 Adding Parameters and Returning Values 175 Accessing Object Properties from Methods 175 Static Methods 179 Using Hints to Check Method Arguments 180 Making Your Classes Self-Contained with Encapsulation 182 Object Overloading with _get(), _set(), and _call() 183 Overloading Property Accesses with __get() and__set() 184 Overloading Method Calls with __call() 187 Other Overloading Methods 191 Using Inheritance to Extend the Power of Objects 192 Overriding Methods in the Parent Class 196 Preserving the Functionality of the Parent Class 198 Blocking Inheritance and Overrides with Final Classes and Methods 199 Using Abstract Classes and Methods 200 Working with Interfaces 204 Constructors and Destructors 209 Setting Up New Objects with Constructors 209 Cleaning Up Objects with Destructors 210 Automatically Loading Class Files 212 Storing Objects as Strings 213 Determining an Object s Class 215 Summary 217 Exercises 218 Part III: Using PHP in Practice Chapter 9: Handling HTML Forms with PHP________________________________221 How HTML Forms Work 222 Capturing Form Data with PHP 230 Dealing Securely with Form Data 234 Handling Empty Form Fields 234 Dealing with Multi-Value Fields 236 Generating Web Forms with PHP 242 Storing PHP Variables in Forms 249 Creating Hie Upload Forms 257 Accessing Information on Uploaded Files 257 Limiting the Size of File Uploads 258 Storing and Using an Uploaded File 259 Redirecting after a Form Submission 264 Summary 266 Exercises 266 Chapter 10: Preserving State With Query Strings, Cookies, and Sessions 267 Saving State with Query Strings 268 Building Query Strings 268 Accessing Data in Query Strings 270 Working with Cookies 274 Cookie Components 274 Setting a Cookie in PHP 276 Accessing Cookies in Your Scripts 277 Removing Cookies 277 Using PHP Sessions to Store Data 282 Creating a Session 282 Reading and Writing Session Data ?8- Destroying a Session -gg Passing Session IDs in Query Strings -Rq Changing Session Behavior qo Summary 296 Exercises 2g6 Chapter 11: Working with Files and Directories_______ 2g7 Understanding Files and Directories Getting Information on Files ^Jj| Time-Related Properties 299 Retrieving a Filename from a Path Opening and Closing Hies 2 _______ Opening a File with fopenQ w Closing a File with fclose() 300 Reading and Writing to Hies 302 Reading and Writing Strings of Characters ^02 Testing for the End of a File 303 Reading One Line at a Time 306 Reading CSV Files 307 Reading and Writing Entire Files 308 309 Random Access to File Data 311 Working with Hie Permissions 312 Changing Permissions 313 Checking File Permissions 314 Copying, Renaming, and Deleting Hies 315 Working with Directories 316 Other Directory Functions 318 Working with Directory Objects 320 Telling a File from a Directory 321 Building a Text Editor 325 The Text Editor Script 325 Testing the Editor 328 Examining the Editor Code 329 Summary 334 Exercise 335 Chapter 12: Introducing Databases and SQL_______________________________337 Deciding How to Store Data 338 Database Architectures 338 Database Models 339 Choosing a Database 340 Understanding Relational Databases 341 Normalization 341 Talking to Databases with SQL 343 Setting Up MySQL 349 Starting the MySQL Server 349 Setting Up the MySQL root Password 350 A Quick Play with MySQL 353 Creating a New Database 353 Creating a Table 354 Adding Data to a Table 356 Reading Data from a Table 356 Updating Data in a Table 357 Deleting Data from a Table 358 Deleting Tables and Databases 358 Connecting to MySQL from PHP 359 Making a Connection 360 Handling Errors 360 Reading Data 361 Summary 365 Exercises 365 Chapter 13: Retrieving Data from MySQL with PHP_________________________367 Setting Up the Book Club Database 367 The BINARY Attribute and Collations 369 The UNIQUE Constraint 370 The ENUM Data Type 370 The TIMESTAMP Data Type 371 Retrieving Data with SELECT 371 Limiting the Number of Rows Returned 372 Sorting Results 373 Using Pattern Matching for Flexible Queries 374 Summarizing Data 375 Eliminating Duplicate Results 377 Grouping Results 373 Pulling Data from Multiple Tables 37g Using Aliases 33^ Other Useful MySQL Operators and Functions 382 Creating a Member Record Viewer 335 Creating the config.php File ggg Creating the common.inc.php File 3gy Creating the DataObject Class File ooo Building the Member Class -g- Building the LogEntry Class 3Q4 Creating the view_members.php Script -g- Creating the view_member.php Script _-- Testing the Application _ Summary ^± Exercises 402 Chapter 14: Manipulating MySQL Data with PHP -n _ Inserting Records Updating Records Jjjjj Deleting Records 4®f Building a Member Registration Application Anfl Adding More Common Code wo Enhancing the Member Class 408 Creating the Registration Script 409 Testing the Application 411 Creating a Members Area 417 Adding an Authentication Method to the Member Class **¦* Enhancing the LogEntry Class to Record Page Views 418 419 Adding More Common Code 420 Writing the Login Page Script 421 Creating a Logout Function 424 Creating the Pages for the Members Area 424 Testing the Members Area 426 Creating a Member Manager Application 428 Adding Update and Delete Methods to the Member Class 428 Adding a Deletion Method to the LogEntry Class 430 Tweaking the viewjmembers.php Script 431 Creating the view_member.php Script 431 Testing the Member Manager 437 Summary 438 Exercises 439 Chapter 15: Making Your Job Easier with PEAR____________________________441 Installing PEAR Packages 442 Testing the PEAR Package Manager on Ubuntu 442 Testing PEAR using Mac OS X and MAMP 443 Installing and Testing PEAR with WampServer on Windows 444 Installing a Package 446 Installing Dependencies 447 Uninstalling Packages 447 Using a PEAR Package 448 Creating HTML Tables with the HTML Table Package 450 Web Forms the Easy Way with HTML_QuickForm 455 Installing HTML_QuickForm 455 Working with HTML_QuickForm 455 Using Validation Rules 460 Summary 470 Exercises 470 Chapter 16: PHP and the Outside World___________________________________471 Working with Dates and Times 472 Understanding Timestamps 472 Getting the Current Date and Time 472 Creating Your Own Timestamps 473 Extracting Date and Time Values from a Timestamp 475 Formatting Date Strings 478 Working with Microseconds 481 DateTime: The Future of PHP Date/Time Handling 487 Working with HTTP 488 Understanding HTTP Requests 489 Exploring HTTP Responses 490 Modifying an HTTP Response 493 Getting Information from the Web Server 494 Sending Email 497 Specifying the Sender Address and Adding Headers 498 Controlling the Return Path Email Address 499 Sending HTML Emails 500 Summary 505 Exercises 505 Chapter 17: Generating images with PHP_______________ 507 Basics of Computer Graphics 507 Color Theory 5qo Coordinate Systems 50g Image Types 509 Creating Images -* 0 Creating a New Image _.0 Allocating Colors _1 _ Outputting Images _. ? -. . ¦ . oil Drawing in an Image Manipulating Images Opening an Existing Image Applying a Watermark Creating Thumbnails Using Text in Images ^ Adding Standard Text 531 Using TrueType Fonts Summary |33 Exercises __6 537 Chapter 18: String Matching with Regular Expressions What Is a Regular Expression? Pattern Matching in PHP 54° Exploring Regular Expression Syntax 541 542 Matching Literal Characters 542 Matching Types of Characters using Character Classes 544 Matching Multiple Characters 545 Greedy and Non-Greedy Matching 546 Using Subpatterns to Group Patterns 546 Referring to Previous Subpattern Matches 547 Matching Alternative Patterns 548 Using Anchors to Match at Specified Positions 548 Hnding Multiple Matches with preg_match_all() 550 Searching Arrays with preg_grep() 556 Replacing Text 557 Replacing Text with preg_replace() 557 Replacing Text using a Callback Function 560 Altering Matching Behavior with Pattern Modifiers 560 Splitting a String with a Regular Expression 562 Summary 571 Exercises 571 Chapter 19: Working with XML___________________________________________573 What Is XML? 574 XML Document Structure 575 Major Parts of an XML Document 576 XML Syntax Rules 577 Using XML Elements and Attributes 578 Valid XML Documents: DTDs and XSDs 578 Reading XML Documents with PHP 582 How XML Parser Works 582 Creating a New Parser 582 Creating Event Handlers 583 Parsing the XML Document 584 Dealing with Parse Errors 584 Writing and Manipulating XML Documents with PHP 589 DOM Basics 590 Creating an XML Document using the DOM 595 Manipulating XML Documents using the DOM 599 Doing XML the Easy Way with SimpleXML 606 Reading an XML Document 608 Creating an XML Document 610 Converting Between SimpleXML and DOM Objects 612 Working with XSL and XSLT 613 Summary 615 Exercises 616 Chapter 20: Writing High-Quality Code __________________________________619 Writing Modular Code 620 Including Files 621 Including a File Only Once 622 Working with Include Paths 623 Dynamic Includes 625 Using Namespaces to Avoid Clashes 625 Using Coding Standards for Consistency 630 Documenting Your Code 631 Writing Good Comments 632 Using phpDocumentor to Generate External Documentation 633 Checking Input and Encoding Output 641 Checking Input §42 Encoding Output g43 Handling Errors g44 Understanding Error Levels g44 Triggering Errors 646 Controlling Where Error Messages Are Sent 647 Logging Your Own Error Messages -47 Letting Your Script Handle Errors -40 Fine-Tuning Error Reporting --^ Using Exception Objects to Handle Errors --- Separating Application Logic from Presentation Logic 660 Automated Code Testing with PHPUnit ?c Summary JJJ Exercises 6?2 Appendix A: Solutions to Exercises___________________ 1573 Appendix B: Configuring PHP_______________ Appendix C: Alternatives to MySQL_____________ ¦-------------¦??-------_____________757 Appendix D: Using PHP from the Command Line ?¦ ~ ¦?¦---------------------.____________765 Index 7__
any_adam_object 1
author Doyle, Matt
author_facet Doyle, Matt
author_role aut
author_sort Doyle, Matt
author_variant m d md
building Verbundindex
bvnumber BV036616981
callnumber-first T - Technology
callnumber-label TK5105
callnumber-raw TK5105.525
callnumber-search TK5105.525
callnumber-sort TK 45105.525
callnumber-subject TK - Electrical and Nuclear Engineering
classification_rvk ST 250
ctrlnum (OCoLC)698972589
(DE-599)BVBBV036616981
dewey-full 006.7/6
dewey-hundreds 000 - Computer science, information, general works
dewey-ones 006 - Special computer methods
dewey-raw 006.7/6
dewey-search 006.7/6
dewey-sort 16.7 16
dewey-tens 000 - Computer science, information, general works
discipline Informatik
format Book
fullrecord <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01372nam a2200397zc 4500</leader><controlfield tag="001">BV036616981</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20100824 </controlfield><controlfield tag="007">t|</controlfield><controlfield tag="008">100816s2010 xxu |||| 00||| eng d</controlfield><datafield tag="010" ind1=" " ind2=" "><subfield code="a">2009017149</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780470413968</subfield><subfield code="c">paper/website</subfield><subfield code="9">978-0-470-41396-8</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)698972589</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV036616981</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">aacr</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="044" ind1=" " ind2=" "><subfield code="a">xxu</subfield><subfield code="c">US</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-Aug4</subfield><subfield code="a">DE-20</subfield><subfield code="a">DE-11</subfield><subfield code="a">DE-523</subfield></datafield><datafield tag="050" ind1=" " ind2="0"><subfield code="a">TK5105.525</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">006.7/6</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Doyle, Matt</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Beginning PHP 5.3</subfield><subfield code="c">Matt Doyle</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Indianapolis, IN</subfield><subfield code="b">Wiley</subfield><subfield code="c">2010</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXXIII, 801 S.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">Wrox programmer to programmer</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Includes index.</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Peer-to-peer architecture (Computer networks)</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">PHP 5.3</subfield><subfield code="0">(DE-588)7638375-1</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">PHP 5.3</subfield><subfield code="0">(DE-588)7638375-1</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HBZ Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&amp;doc_library=BVB01&amp;local_base=BVB01&amp;doc_number=020537097&amp;sequence=000002&amp;line_number=0001&amp;func_code=DB_RECORDS&amp;service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="943" ind1="1" ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-020537097</subfield></datafield></record></collection>
id DE-604.BV036616981
illustrated Not Illustrated
indexdate 2024-12-24T00:09:11Z
institution BVB
isbn 9780470413968
language English
lccn 2009017149
oai_aleph_id oai:aleph.bib-bvb.de:BVB01-020537097
oclc_num 698972589
open_access_boolean
owner DE-Aug4
DE-20
DE-11
DE-523
owner_facet DE-Aug4
DE-20
DE-11
DE-523
physical XXXIII, 801 S.
publishDate 2010
publishDateSearch 2010
publishDateSort 2010
publisher Wiley
record_format marc
series2 Wrox programmer to programmer
spellingShingle Doyle, Matt
Beginning PHP 5.3
Peer-to-peer architecture (Computer networks)
PHP 5.3 (DE-588)7638375-1 gnd
subject_GND (DE-588)7638375-1
title Beginning PHP 5.3
title_auth Beginning PHP 5.3
title_exact_search Beginning PHP 5.3
title_full Beginning PHP 5.3 Matt Doyle
title_fullStr Beginning PHP 5.3 Matt Doyle
title_full_unstemmed Beginning PHP 5.3 Matt Doyle
title_short Beginning PHP 5.3
title_sort beginning php 5 3
topic Peer-to-peer architecture (Computer networks)
PHP 5.3 (DE-588)7638375-1 gnd
topic_facet Peer-to-peer architecture (Computer networks)
PHP 5.3
url http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=020537097&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA
work_keys_str_mv AT doylematt beginningphp53