❞ كتاب Programming PHP ❝

❞ كتاب Programming PHP ❝

Rasmus Lerdorf and Kevin Tatroe
with Bob Kaehms and Ric McGredy


Programming PHP
by Rasmus Lerdorf and Kevin Tatroe
with Bob Kaehms and Ric McGredy
Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly & Associates, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly & Associates books may be purchased for educational, business, or sales promotional
use. Online editions are also available for most titles (
safari.oreilly.com
). For more information,
contact our corporate/institutional sales department: (800) 998-9938 or
corporate@oreilly.com
.
Editors:
Nathan Torkington and Paula Ferguson
Production Editor:
Rachel Wheeler
Cover Designer:
Ellie Volckhausen
Interior Designer:
Melanie Wang
Printing History:
March 2002:
First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered
trademarks of O’Reilly & Associates, Inc. Many of the designations used by manufacturers and
sellers to distinguish their products are claimed as trademarks. Where those designations appear
in this book, and O’Reilly & Associates, Inc. was aware of a trademark claim, the designations
have been printed in caps or initial caps. The association between the image of a cuckoo and PHP
is a trademark of O’Reilly & Associates, Inc.
While every precaution has been taken in the preparation of this book, the publisher and authors
assume no responsibility for errors or omissions, or for damages resulting from the use of the
information contained herein
This is the Title of the Book, eMatter Edition
Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.
ix
Preface
Now, more than ever, the Web is a major vehicle for corporate and personal commu-
nications. Web sites carry photo albums, shopping carts, and product lists. Many of
those web sites are driven by PHP, an open source scripting language primarily
designed for generating HTML content.
Since its inception in 1994, PHP has swept over the Web. The millions of web sites
powered by PHP are testament to its popularity and ease of use. It lies in the sweet
spot between Perl/CGI, Active Server Pages (ASP), and HTML. Everyday people can
learn PHP and can build powerful dynamic web sites with it.
The core PHP language features powerful string- and array-handling facilities, as well
as support for object-oriented programming. With the use of standard and optional
extension modules, a PHP application can interact with a database such as MySQL
or Oracle, draw graphs, create PDF files, and parse XML files. You can write your
own PHP extension modules in C—for example, to provide a PHP interface to the
functions in an existing code library. You can even run PHP on Windows, which lets
you control other Windows applications such as Word and Excel with COM, or
interact with databases using ODBC.
This book is a guide to the PHP language. When you finish this book, you will know
how the PHP language works, how to use the many powerful extensions that come
standard with PHP, and how to design and build your own PHP web applications. -
من كتب بي اتش بي كتب تطوير المواقع الالكترونيه - مكتبة كتب تقنية المعلومات.

نبذة عن الكتاب:
Programming PHP

Rasmus Lerdorf and Kevin Tatroe
with Bob Kaehms and Ric McGredy


Programming PHP
by Rasmus Lerdorf and Kevin Tatroe
with Bob Kaehms and Ric McGredy
Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly & Associates, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly & Associates books may be purchased for educational, business, or sales promotional
use. Online editions are also available for most titles (
safari.oreilly.com
). For more information,
contact our corporate/institutional sales department: (800) 998-9938 or
corporate@oreilly.com
.
Editors:
Nathan Torkington and Paula Ferguson
Production Editor:
Rachel Wheeler
Cover Designer:
Ellie Volckhausen
Interior Designer:
Melanie Wang
Printing History:
March 2002:
First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered
trademarks of O’Reilly & Associates, Inc. Many of the designations used by manufacturers and
sellers to distinguish their products are claimed as trademarks. Where those designations appear
in this book, and O’Reilly & Associates, Inc. was aware of a trademark claim, the designations
have been printed in caps or initial caps. The association between the image of a cuckoo and PHP
is a trademark of O’Reilly & Associates, Inc.
While every precaution has been taken in the preparation of this book, the publisher and authors
assume no responsibility for errors or omissions, or for damages resulting from the use of the
information contained herein
This is the Title of the Book, eMatter Edition
Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.
ix
Preface
Now, more than ever, the Web is a major vehicle for corporate and personal commu-
nications. Web sites carry photo albums, shopping carts, and product lists. Many of
those web sites are driven by PHP, an open source scripting language primarily
designed for generating HTML content.
Since its inception in 1994, PHP has swept over the Web. The millions of web sites
powered by PHP are testament to its popularity and ease of use. It lies in the sweet
spot between Perl/CGI, Active Server Pages (ASP), and HTML. Everyday people can
learn PHP and can build powerful dynamic web sites with it.
The core PHP language features powerful string- and array-handling facilities, as well
as support for object-oriented programming. With the use of standard and optional
extension modules, a PHP application can interact with a database such as MySQL
or Oracle, draw graphs, create PDF files, and parse XML files. You can write your
own PHP extension modules in C—for example, to provide a PHP interface to the
functions in an existing code library. You can even run PHP on Windows, which lets
you control other Windows applications such as Word and Excel with COM, or
interact with databases using ODBC.
This book is a guide to the PHP language. When you finish this book, you will know
how the PHP language works, how to use the many powerful extensions that come
standard with PHP, and how to design and build your own PHP web applications.
.
المزيد..

تعليقات القرّاء:

v
Table of Contents
Preface
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
ix
1.
Introduction to PHP
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
What Does PHP Do?
 1
A Brief History of PHP
 2
Installing PHP
 7
A Walk Through PHP
 9
2.
Language Basics
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
Lexical Structure
 17
Data Types
 23
Variables
 30
Expressions and Operators
 34
Flow-Control Statements
 46
Including Code
 54
Embedding PHP in Web Pages
 56
3.
Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
Calling a Function
 61
Defining a Function
 62
Variable Scope
 64
Function Parameters
 66
Return Values
 69
Variable Functions
 70
Anonymous Functions
 71
4.
Strings
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
72
Quoting String Constants
 72
Printing Strings
 75
,progphpTOC.fm.17249  Page v  Wednesday, March 13, 2002  11:46 AM
vi
|
Table of Contents
Accessing Individual Characters
 79
Cleaning Strings
 80
Encoding and Escaping
 81
Comparing Strings
 86
Manipulating and Searching Strings
 89
Regular Expressions
 95
POSIX-Style Regular Expressions
 99
Perl-Compatible Regular Expressions
 103
5.
Arrays
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
116
Indexed Versus Associative Arrays
 116
Identifying Elements of an Array
 117
Storing Data in Arrays
 117
Multidimensional Arrays
 120
Extracting Multiple Values
 120
Converting Between Arrays and Variables
 124
Traversing Arrays
 125
Sorting
 130
Acting on Entire Arrays
 135
Using Arrays
 136
6.
Objects
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
140
Terminology
 141
Creating an Object
 141
Accessing Properties and Methods
 142
Declaring a Class
 143
Introspection
 147
Serialization
 153
7.
Web Techniques
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
158
HTTP Basics
 158
Variables
 159
Server Information
 160
Processing Forms
 162
Setting Response Headers
 175
Maintaining State
 178
SSL
 188
,progphpTOC.fm.17249  Page vi  Wednesday, March 13, 2002  11:46 AM
Table of Contents
|
vii
8.
Databases
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
189
Using PHP to Access a Database
 189
Relational Databases and SQL
 190
PEAR DB Basics
 192
Advanced Database Techniques
 197
Sample Application
 202
9.
Graphics
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
214
Embedding an Image in a Page
 214
The GD Extension
 215
Basic Graphics Concepts
 216
Creating and Drawing Images
 217
Images with Text
 220
Dynamically Generated Buttons
 223
Scaling Images
 227
Color Handling
 228
10.
PDF
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
233
PDF Extensions
 233
Documents and Pages
 233
Text
 237
Images and Graphics
 246
Navigation
 255
Other PDF Features
 259
11.
XML
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
262
Lightning Guide to XML
 262
Generating XML
 264
Parsing XML
 265
Transforming XML with XSLT
 277
Web Services
 280
12.
Security
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
285
Global Variables and Form Data
 285
Filenames
 287
File Uploads
 289
File Permissions
 291
,progphpTOC.fm.17249  Page vii  Wednesday, March 13, 2002  11:46 AM
viii
|
Table of Contents
Concealing PHP Libraries
 293
PHP Code
 294
Shell Commands
 295
Security Redux
 296
13.
Application Techniques
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
297
Code Libraries
 297
Templating Systems
 298
Handling Output
 301
Error Handling
 303
Performance Tuning
 308
14.
Extending PHP
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
317
Architectural Overview
 317
What You’ll Need
 318
Building Your First Extensions
 319
The config.m4 File
 327
Memory Management
 329
The pval/zval Data Type
 331
Parameter Handling
 335
Returning Values
 338
References
 342
Global Variables
 343
Creating Variables
 345
Extension INI Entries
 347
Resources
 349
Where to Go from Here
 350
15.
PHP on Windows
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
351
Installing and Configuring PHP on Windows
 351
Writing Portable Code for Windows and Unix
 355
Interfacing with COM
 359
Interacting with ODBC Data Sources
 367
A.
Function Reference
 . . . . . 
 

 PHP language for beginners pdf

 Programming PHP
what is php
تعلم php خطوة بخطوة
php w3schools
php tutorial
php pdf
php ماهو
php tutorial arabic
learn php pdf
 



حجم الكتاب عند التحميل : 6.9 ميجا بايت .
نوع الكتاب : pdf.
عداد القراءة: عدد قراءة Programming PHP

اذا اعجبك الكتاب فضلاً اضغط على أعجبني
و يمكنك تحميله من هنا:

تحميل Programming PHP
شكرًا لمساهمتكم

شكراً لمساهمتكم معنا في الإرتقاء بمستوى المكتبة ، يمكنكم االتبليغ عن اخطاء او سوء اختيار للكتب وتصنيفها ومحتواها ، أو كتاب يُمنع نشره ، او محمي بحقوق طبع ونشر ، فضلاً قم بالتبليغ عن الكتاب المُخالف:

برنامج تشغيل ملفات pdfقبل تحميل الكتاب ..
يجب ان يتوفر لديكم برنامج تشغيل وقراءة ملفات pdf
يمكن تحميلة من هنا 'http://get.adobe.com/reader/'