E-Book, Englisch, 1080 Seiten
Gilmore Beginning PHP and MySQL
3rd ed
ISBN: 978-1-4302-0299-8
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
From Novice to Professional
E-Book, Englisch, 1080 Seiten
ISBN: 978-1-4302-0299-8
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
This is the third edition of the highly practical work that offers a comprehensive introduction to two of the most prominent open source technologies on the planet: the PHP scripting language and the MySQL database server. In this incarnation, W. Jason Gilmore's book has been updated to cover the new features in PHP as that language makes the very significant jump from version 5 to version 6. Essentially three books in one, readers not only profit from extensive introductions to the core features of each technology, but also learn how to effectively integrate the two in order to build robust data-driven applications. The book is packed with practical examples and insight into the real-world challenges faced by developers.
W. Jason Gilmore is a web developer and business consultant with more than 15 years of experience helping companies large and small build amazing software solutions. He has been teaching developers from around the world about web development for over a decade, having written six books, including the bestselling Beginning PHP and MySQL, Fourth Edition and Easy PHP Websites with the Zend Framework, Second Edition .Over the years Jason has been published more than 300 times within popular publications such as Developer.com, PHPBuilder.com, JSMag, and Linux Magazine, and instructed hundreds of students in the United States and Europe. He s recently led the successful development and deployment of a 10,000+ product e-commerce project, and is currently working on a variety of new e-commerce initiatives. Jason is cofounder of the wildly popular CodeMash Conference, the largest multi-day developer event in the Midwest.
Autoren/Hrsg.
Weitere Infos & Material
1;Contents at a Glance;5
2;Contents;7
3;About the Author;26
4;About the Technical Reviewers;27
5;Acknowledgments;28
6;Introduction;29
6.1;Download the Code;30
6.2;Contact Me!;30
7;Introducing PHP;31
7.1;History;32
7.2;General Language Features;37
7.3;Summary;40
8;Configuring Your Environment;41
8.1;Installation Prerequisites;42
8.2;Installing Apache and PHP on Linux;45
8.3;Installing Apache and PHP on Windows;47
8.4;Installing IIS and PHP on Windows;50
8.5;Testing Your Installation;53
8.6;Configuring PHP;55
8.7;Run- Time Configuration;57
8.8;Choosing a Code Editor;78
8.9;Choosing a Web Hosting Provider;80
8.10;Summary;83
9;PHP Basics;84
9.1;Embedding PHP Code in Your Web Pages;85
9.2;Commenting Your Code;88
9.3;Outputting Data to the Browser;90
9.4;PHP’s Supported Datatypes;94
9.5;Identifiers;102
9.6;Variables;102
9.7;Constants;115
9.8;Expressions;116
9.9;String Interpolation;124
9.10;Control Structures;127
9.11;Summary;141
10;Functions;142
10.1;Invoking a Function;142
10.2;Creating a Function;144
10.3;Function Libraries;153
10.4;Summary;154
11;Arrays;155
11.1;What Is an Array?;156
11.2;Creating an Array;157
11.3;Adding and Removing Array Elements;162
11.4;Locating Array Elements;164
11.5;Traversing Arrays;166
11.6;Determining Array Size and Uniqueness;171
11.7;Sorting Arrays;173
11.8;Merging, Slicing, Splicing, and Dissecting Arrays;181
11.9;Other Useful Array Functions;188
11.10;Summary;190
12;Object-Oriented PHP;191
12.1;The Benefits of OOP;192
12.2;Key OOP Concepts;194
12.3;Constructors and Destructors;210
12.4;Static Class Members;215
12.5;The instanceof Keyword;217
12.6;Helper Functions;217
12.7;Autoloading Objects;219
12.8;Summary;220
13;Advanced OOP Features;221
13.1;Advanced OOP Features Not Supported by PHP;222
13.2;Object Cloning;222
13.3;Inheritance;226
13.4;Interfaces;231
13.5;Abstract Classes;235
13.6;Introducing Namespaces;236
13.7;Summary;239
14;Error and Exception Handling;240
14.1;Configuration Directives;241
14.2;Error Logging;244
14.3;Exception Handling;248
14.4;Summary;256
15;Strings and Regular Expressions;257
15.1;Regular Expressions;258
15.2;Other String- Specific Functions;274
15.3;Alternatives for Regular Expression Functions;286
15.4;Taking Advantage of PEAR: Validate_ US;300
15.5;Summary;302
16;Working with the File and Operating System;303
16.1;Learning About Files and Directories;304
16.2;Working with Files;312
16.3;Executing Shell Commands;327
16.4;System- Level Program Execution;329
16.5;Summary;334
17;PEAR;335
17.1;Popular PEAR Packages;336
17.2;The Power of PEAR: Converting Numeral Formats;338
17.3;Installing and Updating PEAR;339
17.4;Using the PEAR Package Manager;342
17.5;Summary;348
18;Date and Time;349
18.1;The Unix Timest349
18.2;PHP’s Date and Time Library;350
18.3;Date Fu;359
18.4;Date and Time Enhancements for PHP 5.1+ Users;371
18.5;Summary;374
19;Forms;375
19.1;PHP and Web Forms;375
19.2;Taking Advantage of PEAR: HTML_ QuickForm;381
19.3;Summary;390
20;Authenticating Your Users;391
20.1;HTTP Authentication Concepts;392
20.2;PHP Authentication;393
20.3;PHP Authentication Methodologies;396
20.4;User Login Administration;406
20.5;Summary;412
21;Handling File Uploads;413
21.1;Uploading Files via HTTP;413
21.2;Uploading Files with PHP;414
21.3;Taking Advantage of PEAR: HTTP_ Upload;421
21.4;Summary;425
22;Networking;426
22.1;DNS, Services, and Servers;427
22.2;Mail;436
22.3;Common Networking Tasks;443
22.4;Summary;449
23;PHP and LDAP;450
23.1;Using LDAP from PHP;452
23.2;Summary;468
24;Session Handlers;469
24.1;What Is Session Handling?;469
24.2;Configuration Directives;472
24.3;Working with Sessions;477
24.4;Practical Session- Handling Examples;482
24.5;Creating Custom Session Handlers;486
24.6;Summary;493
25;Templating with Smarty;494
25.1;What’s a Templating Engine?;495
25.2;Introducing Smarty;497
25.3;Installing Smarty;498
25.4;Using Smarty;500
25.5;Smarty’s Presentational Logic;502
25.6;Creating Configuration Files;516
25.7;Using CSS in Conjunction with Smarty;518
25.8;Caching;520
25.9;Summary;524
26;Web Services;525
26.1;Why Web Services?;526
26.2;Really Simple Syndication;528
26.3;SimpleXML;541
26.4;SOAP;548
26.5;Summary;559
27;Secure PHP Programming;560
27.1;Configuring PHP Securely;561
27.2;Hiding Configuration Details;567
27.3;Hiding Sensitive Data;570
27.4;Sanitizing User Data;571
27.5;Data Encryption;580
27.6;Summary;586
28;SQLite;587
28.1;Introduction to SQLite;587
28.2;PHP’s SQLite Library;591
28.3;Summary;610
29;Building Web Sites for the World;611
29.1;Translating Web Sites with Gettext;612
29.2;Localizing Dates, Numbers, and Times;618
29.3;Summary;620
30;MVC and the Zend Framework;621
30.1;Introducing MVC;621
30.2;PHP’s Framework Solutions;625
30.3;Introducing the Zend Framework;627
30.4;Summary;640
31;Introducing MySQL;641
31.1;What Makes MySQL So Popular?;642
31.2;The Evolution of MySQL;648
31.3;Prominent MySQL Users;651
31.4;Summary;653
32;Installing and Configuring MySQL;654
32.1;Downloading MySQL;655
32.2;Installing MySQL;655
32.3;Setting the MySQL Administrator Password;664
32.4;Starting and Stopping MySQL;665
32.5;Configuring and Optimizing MySQL;671
32.6;Configuring PHP to Work with MySQL;680
32.7;Summary;681
33;The Many MySQL Clients;682
33.1;Introducing the Command- Line Clients;682
33.2;MySQL’s GUI Client Programs;705
33.3;phpMyAdmin;710
33.4;Summary;711
34;MySQL Storage Engines and Datatypes;712
34.1;Storage Engines;712
34.2;Datatypes and Attributes;725
34.3;Working with Databases and Tables;737
34.4;Summary;747
35;Securing MySQL;749
35.1;What You Should Do First;750
35.2;Securing the mysqld Daemon;752
35.3;The MySQL Access Privilege System;752
35.4;User and Privilege Management;768
35.5;Limiting User Resources;777
35.6;Secure MySQL Connections;778
35.7;Summary;783
36;Using PHP with MySQL;785
36.1;Handling Installation Prerequisites;786
36.2;Using the mysqli Extension;788
36.3;Interacting with the Database;793
36.4;Executing Database Transactions;808
36.5;Summary;809
37;Introducing PDO;810
37.1;Another Database Abstraction Layer?;812
37.2;Using PDO;813
37.3;Summary;834
38;Stored Routines;835
38.1;Should You Use Stored Routines?;836
38.2;How MySQL Implements Stored Routines;837
38.3;Integrating Routines into Web Applications;861
38.4;Summary;863
39;MySQL Triggers;864
39.1;Introducing Triggers;864
39.2;MySQL’s Trigger Support;868
39.3;Integrating Triggers into Web Applications;874
39.4;Summary;876
40;MySQL Views;877
40.1;Introducing Views;878
40.2;MySQL’s View Support;879
40.3;Incorporating Views into Web Applications;890
40.4;Summary;892
41;Practical Database Queries;893
41.1;Sample Data;894
41.2;Creating Tabular Output with PEAR;894
41.3;Sorting Output;904
41.4;Creating Paged Output;906
41.5;Listing Page Numbers;909
41.6;Querying Multiple Tables with Subqueries;911
41.7;Iterating Result Sets with Cursors;916
41.8;Summary;920
42;Indexes and Searching;921
42.1;Database Indexing;921
42.2;Forms-Based Searches;933
42.3;Summary;938
43;Transactions;939
43.1;What’s a Transaction?;939
43.2;MySQL’s Transactional Capabilities;940
43.3;A Sample Project;942
43.4;Building Transactional Applications with PHP;947
43.5;Summary;951
44;Importing and Exporting Data;952
44.1;Sample Table;953
44.2;Using Data Delimitation;953
44.3;Importing Data;954
44.4;Exporting Data;964
44.5;Summary;968
45;Index;969




