ARRAY(0xae5337a4)

Vous l'avez déjà ? Vendez votre exemplaire ici
Dites-le à l'éditeur :
J'aimerais lire ce livre sur Kindle !

Vous n'avez pas encore de Kindle ? Achetez-le ici ou téléchargez une application de lecture gratuite.

PHP and MySQL Web Development [Anglais] [Broché]

Laura Thomson , Luke Welling
3.0 étoiles sur 5  Voir tous les commentaires (1 commentaire client)

Voir les offres de ces vendeurs.


‹  Retourner à l'aperçu du produit

Table des matières

I. USING PHP.

PHP Crash Course.

Using PHP. Sample Application: Bob's Auto Parts.

The Order Form. Processing the Form.

Embedding PHP in HTML.

Using PHP Tags. PHP Tag Styles. PHP Statements. Whitespace. Comments.

Adding Dynamic Content.

Calling Functions. The date() Function.

Accessing Form Variables.

Form Variables. String Concatenation. Variables and Literals.

Identifiers. User-Declared Variables. Assigning Values to Variables. Variable Types.

PHP's Data Types. Type Strength. Type Casting. Variable Variables.

Constants. Variable Scope. Operators.

Arithmetic Operators. String Operators. Assignment Operators. Comparison Operators. Logical Operators. Bitwise Operators. Other Operators.

Using Operators: Working Out the Form Totals. Precedence and Associativity: Evaluating Expressions. Variable Functions.

Testing and Setting Variable Types. Testing Variable Status. Reinterpreting Variables.

Control Structures. Making Decisions with Conditionals.

if Statements. Code Blocks. A Side Note: Indenting Your Code. else Statements. elseif Statements. switch Statements. Comparing the Different Conditionals.

Iteration: Repeating Actions.

while Loops. for Loops. do..while Loops.

Breaking Out of a Control Structure or Script. Next: Saving the Customer's Order.

2. Storing and Retrieving Data.

Saving Data for Later. Storing and Retrieving Bob's Orders. Overview of File Processing. Opening a File.

File Modes. Using fopen() to Open a File. Opening Files for FTP or HTTP. Problems Opening Files.

Writing to a File. Parameters for fwrite(). File Formats.

Closing a File. Reading from a File.

Opening a File for Reading: fopen(). Knowing When to Stop: feof(). Reading a Line at a Time: fgets(), fgetss(), and fgetcsv(). Reading the Whole File: readfile(), fpassthru(), file(). Reading a Character: fgetc(). Reading an Arbitrary Length: fread().

Other Useful File Functions.

Checking Whether a File Is There: file_exists(). Knowing How Big a File Is: filesize(). Deleting a File: unlink(). Navigating Inside a File: rewind(), fseek(), and ftell().

File Locking. Doing It a Better Way: Database Management Systems.

Problems with Using Flat Files. How RDBMSs Solve These Problems. Further Reading. Next.

3. Using Arrays.

What Is an Array? Numerically Indexed Arrays.

Initializing Numerically Indexed Arrays. Accessing Array Contents. Using Loops to Access the Array.

Associative Arrays. Initializing an Associative Array. Accessing the Array Elements. Using Loops with each() and list().

Multidimensional Arrays. Sorting Arrays.

Using sort(). Using asort() and ksort() to Sort Associative Arrays. Sorting in Reverse.

Sorting Multidimensional Arrays.

User Defined Sorts. Reverse User Sorts.

Reordering Arrays.

Using shuffle(). Using array_reverse().

Loading Arrays from Files. Other Array Manipulations.

Navigating Within an Array: each, current(), reset(), end(), next(), pos(), and prev(). Applying Any Function to Each Element in an Array: array_walk(). Counting Elements in an Array: count(), sizeof(), and array_count_values(). Converting Arrays to Scalar Variables: extract().

Further Reading. Next.

4. String Manipulation and Regular Expressions.

Example Application: Smart Form Mail. Formatting Strings.

Trimming Strings: chop(), ltrim(), and trim(). Formatting Strings for Presentation. Formatting Strings for Storage: AddSlashes() and StripSlashes().

Joining and Splitting Strings with String Functions.

Using explode(), implode(), and join(). Using strtok(). Using substr().

Comparing Strings.

String Ordering: strcmp(),strcasecmp(), and strnatcmp(). Testing String Length with strlen().

Matching and Replacing Substrings with String Functions.

Finding Strings in Strings: strstr(), strchr(), strrchr(), stristr(). Finding the Position of a Substring: strpos(), strrpos(). Replacing Substrings: str_replace(), substr_replace().

Introduction to Regular Expressions.

The Basics. Character Sets and Classes. Repetition. Subexpressions. Counted Subexpressions. Anchoring to the Beginning or End of a String. Branching Matching Literal Special Characters. Summary of Special Characters. Putting It All Together for the Smart Form.

Finding Substrings with Regular Expressions. Replacing Substrings with Regular Expressions. Splitting Strings with Regular Expressions. Comparison of String Functions and Regular Expression Functions. Further Reading. Next.

5. Reusing Code and Writing Functions.

Why Reuse Code?

Cost. Reliability. Consistency.

Using require() and include().

Using require(). File Name Extensions and Require(). PHP Tags and require().

Using require() for Web Site Templates.

Using auto_prepend_file and auto_append_file. Using include().

Using Functions in PHP.

Calling Functions. Call to Undefined Function. Case and Function Names.

Why Should You Define Your Own Functions? Basic Function Structure.

Naming Your Function.

Parameters. Scope. Pass by Reference Versus Pass by Value. Returning from Functions. Returning Values from Functions. Code Blocks.

Recursion. Further Reading. Next.

6. Object-Oriented PHP.

Object-Oriented Concepts.

Classes and Objects. Polymorphism. Inheritance.

Creating Classes, Attributes, Operations in PHP. Structure of a Class. Constructors.

Instantiation. Using Class Attributes. Calling Class Operations. Implementing Inheritance in PHP.

Overriding. Multiple Inheritance.

Designing Classes. Writing the Code for Your Class. Next.

II. USING MYSQL.

7. Designing Your Web Database.

Relational Database Concepts.

Tables. Columns. Rows. Values. Keys. Schemas. Relationships.

How to Design Your Web Database.

Think About the Real World Objects You Are Modeling. Avoid Storing Redundant Data. Use Atomic Column Values. Choose Sensible Keys. Think About the Questions You Want to Ask the Database. Avoid Designs with Many Empty Attributes. Summary of Table Types.

Web Database Architecture.

Architecture.

Further Reading. Next.

8. Creating Your Web Database.

A Note on Using the MySQL Monitor. How to Log In to MySQL. Creating Databases and Users.

Creating the Database.

Users and Privileges. Introduction to MySQL's Privilege System.

Principle of Least Privilege. Setting Up Users: The GRANT Command. Types and Levels of Privilege. The REVOKE Command. Examples Using GRANT and REVOKE.

Setting Up a User for the Web.

Logging Out As root.

Using the Right Database. Creating Database Tables.

What the Other Keywords Mean. Understanding the Column Types. Looking at the Database with SHOW and DESCRIBE.

MySQL Identifiers. Column Data Types.

Numeric Types. Further Reading. Next.

9. Working with Your MySQL Database.

What Is SQL? Inserting Data into the Database.

Retrieving Data from the Database. Retrieving Data with Specific Criteria. Retrieving Data from Multiple Tables. Retrieving Data in a Particular Order. Grouping and Aggregating Data. Choosing Which Rows to Return.

Updating Records in the Database. Altering Tables After Creation. Deleting Records from the Database. Dropping Tables. Dropping a Whole Database. Further Reading. Next.

10. Accessing Your MySQL Database from the Web with PHP.

How Web Database Architectures Work. The Basic Steps in Querying a Database from the Web. Checking and Filtering Input Data. Setting Up a Connection. Choosing a Database to Use. Querying the Database. Retrieving the Query Results. Disconnecting from the Database. Putting New Information in the Database. Other Useful PHP-MySQL Functions.

Freeing Up Resources. Creating and Deleting Databases.

Other PHP-Database Interfaces. Further Reading. Next.

11. Advanced MySQL.

Understanding the Privilege System in Detail.

The user Table. The db and host Tables. The tables_priv and columns_priv Tables. Access Control: How MySQL Uses the Grant Tables. Updating Privileges: When Do Changes Take Effect?

Making Your MySQL Database Secure.

MySQL from the Operating System's Point of View. Passwords. User Privileges. Web Issues.

Getting More Information About Databases.

Getting Information with SHOW. Getting Information About Columns with DESCRIBE. Understanding How Queries Work with EXPLAIN.

Speeding Up Queries with Indexes. General Optimization Tips.

Design Optimization. Permissions. Table Optimization. Using Indexes. Use Default Values. Use Persistent Connections. Other Tips.

Different Table Types. Loading Data from a File. Further Reading. Next.

III. E-COMMERCE AND SECURITY.

12. Running an E-commerce Site.

What Do You Want to Achieve? Types of Commercial Web Sites.

Online Brochures. Taking Orders for Goods or Services. Providing Services and Digital Goods. Adding Value to Goods or Services. Cutting Costs.

Risks and Threats.

Crackers. Failing to Attract Sufficient Business. Computer Hardware Failure. Power, Communication, Network, or Shipping Failures. Extens...

‹  Retourner à l'aperçu du produit