Нашли опечатку? Выделите ее мышкой и нажмите Ctrl+Enter
Название: Programming PHP
Авторы: Lerdorf R., Tatroe K., MacIntyre P.
Аннотация:
This book does exactly what I believe it is intended to do; Teach a new PHP programmer the basic syntax of the language and give insight into PHP's more language specific features. Having used PHP before there were a two main things I was looking for in this book.
The first of these was Readability. There are two very different ways to read this book. The first is to just go through it as if it were a novel. For someone who is completely new to the language, this would be the ideal method as it steps through the different parts of the language, gradually increasing in difficulty and complexity as you go. However, my main problem with this is found in the later chapters, where the topics turn from the language itself to very specific tasks and libraries. Of course it's nice to know that PHP has the capability to write PDF files, but I don't think that should be a part of this book. It isn't standard by any means and for someone like myself, if I wasn't already experienced in PHP I would still feel like it could be space better used in this otherwise great book.
The other way to go through the book is to simply search what you are looking for. I read this book mainly to refresh myself on some of the concepts and syntax of the language, and was able to do just that in a timely fashion. If there is something you're specifically looking for, it can be found relatively quickly. Sometimes the progression of topics within a chapter can seem a little out of order, but the chapters are short and concise enough to where this isn't really a problem.
The second important factor was the actual content of the book. As far as reading the descriptions of what the code does and how it all works, I thought it was well written and would be sufficient who has had experience in another language. Based on a few of the other reviews I looked at of this book, I will have to agree that some of the code does not perhaps use the best standards. However, that's not the purpose of this book. Sometimes the most complex and efficient solution is not the best for teaching and explaining. I'd much rather see some basic code structure repeated five times in a block than have to decipher some complex for loop to achieve a menial task.
Aside from the style of the code though, my only real concern is with the code relating to the specific extensions, which I really don't feel belong. Other than this though, each section of code is clearly explained by the text preceding and is written in a manner clear enough for a novice in the field and language to understand.
Tags, PHP code (<?php ?>)10 tags, XML262—264 Tags, XML, nesting263 tan() function451 Target encoding for XML parser270 TCP protocol194 Templates for PDF documents253—255 Templating systems298—301 Templating systems, HTML template for thank you page299 Templating systems, template script (example)299 Templating systems, user input form (example)298 tempnam() function451 Terminating PDF document236 Ternary operator3646 Testing, C-language PHP extension326 Testing, colors, program for231 Testing, return value for failure93 Text in images220—223 Text in images, buttons223 Text in images, fonts221—223 text in PDF files237—246 Text in PDF files, altering appearance of241—243 Text in PDF files, coordinates237—239 Text in PDF files, fonts243—246 Text in PDF files, functions for239—241 Text in PDF files, outputting basic236 Text, languages other than English, working with99 Text, representing image with232 Textual (lexicographic) comparisons39 This variable144 Thread Safe Resource Manager (TSRM)318 Thread safety, extensions359 Thread safety, extensionwide global variables344 Throwing errors305 Thumbnails for bookmarks, PDF documents256—258 Tick functions, registering437 Tick functions, unregistering454 Ticks directive54 TIFF image format in PDF files246 Timesee also "Dates""Times" time() function451 Time, functions for375 Time, gettimeofday() function411 Timeouts for current script439 Timeouts, setting for sockets441 tmpfile() functions452 tokenizing strings92449 touch() function452 Track_errors option (php.ini file)304 Trailing options, Perl-style regular expressions107 Transactions202 Transforming XML with XSLT277—280 Transforming XML with XSLT, creating XSLT processor278 Transitions for PDF pages261 Translation tables for HTML entities83406 transparency of images216228see Transparency of images in PDF files246 Traversing arrays125 Traversing arrays in random order, using shuffle() function134 Traversing arrays with for loop127 Traversing arrays, calling function for each element128 Traversing arrays, iterator functions126 Traversing arrays, reducing an array128 Traversing arrays, searching for values129 trigger_error() function305452 trim() function80452 trimming strings438 True and false keywords27 True color images216 True color images, background colors for229 True color images, converting to paletted image229 True color images, true color color indexes231 TrueType fonts in PDF files244 TrueType fonts, antialiased, troubleshooting224 TrueType fonts, using with GD221 Truncating files404 Truth valuessee "Boolean data type" TSRM (Thread Safe Resource Manager)318 Type juggling37 Type_spec strings335 Type_spec strings, specification characters336 Type_spec strings, specification characters, modifiers336 uasort() function130452 ucfirst() function81452 ucwords() function81453 uksort() function130453 umask() function291453 unary operators36 Unary operators, - (arithmetic negation) operator38 Unary operators, autoincrement and autodecrement39 Uncompressing and extracting PHP and Apache distributions8 Underlining text in PDF files241 Unicode, character encodings supported by XML parser270 Unicode, FriBiDi extension, reordering strings for encoded character set461 union of two sets137 uniqid() function453 Unix, installing PHP7—9 Unix, locale system in POSIX-style regular expressions99 Unix, protocol for databases194 Unix, shell scripting languages, comments m19 Unix, writing portable PHP code for355—359 Unix, writing portable PHP code for, determining the platform355 Unix, writing portable PHP code for, end-of-file handling358 Unix, writing portable PHP code for, end-of-line handling358 Unix, writing portable PHP code for, environment information356 Unix, writing portable PHP code for, extensions359 Unix, writing portable PHP code for, paths, handling356 Unix, writing portable PHP code for, remote files357 Unix, writing portable PHP code for, sending mail356 Unix, writing portable PHP code for, server-specific functions356 Unix, writing portable PHP code for, shell commands359 unlink() function62453 unpack() function453 Unpacking Apache and PHP source distributions8 Unparsed XML entities268 Unregister_tick_function() function454 unserialize() function454 unset() function34454 Uploaded files, information about160 Uploaded files, moving424 uploading files172 Uploading files, security and289 Uploading files, security and, distrusting browser-supplied filenames289 URL rewriting, storing state information178 urldecode() function85 urlencode() function85224454 URLs, decomposing (parse_url() function)95 URLs, encoding/decoding435 URLs, encoding/decoding strings as84 URLs, encoding/decoding strings as, button strings224 URLs, extracting from HTML page111 URLs, functions for377 URLs, GET and POST requests162 URLs, https://188 URLs, opening remotely with PHP functions, security risks of288 URLs, parse_url() function430 URLs, session IDS, passing via184 US-ASCIIsee "ASCII" User-Agent headers158 User-defined functions61 User-defined functions, sorting arrays with452455 User-defined order, sorting arrays in130131—133 Usernames, authenticating177 Usernames, current, for PHP script executing406 Usernames, security problems with287 user_error() function454 usleep() function455 usort() function130455 usort() function, anonymous function, using with71 UTF-8 character encoding270
UTF-8 character encoding, printing high-bit ASCII characters222 Validating, credit-card numbers, with Luhn checksum101 Validating, forms173—175 Variable argument list, processing337 variable functions70 Variables30—33see Variables, $PHP_SELF160 variables, assigning values to44 Variables, case-sensitivity in names17 Variables, checking values with isset() function34418 Variables, configuration, getting405 Variables, converting HTML field names to163 Variables, converting to/from arrays124 Variables, creating for extensions345—347 Variables, defined, getting406 Variables, EGPCS (environment, GET, POST, cookie and server)159287 Variables, expanding in double-quoted strings25 Variables, function parameters33 Variables, functions for377 Variables, global, form data and, security issues285—287 Variables, global, internal PHP, accessing from extension functions343—345 Variables, global, SAPI (Server Abstraction API)343 Variables, interpolating into strings72 Variables, mapping names to value positions in memory33 Variables, names, $ (dollar sign) in22 Variables, NULL value29 Variables, number of function parameters68 Variables, object references142 Variables, outputting information about455 variables, passing by reference66 variables, passing by value66 Variables, property names, using with143 Variables, references to variables stored in another variable30 Variables, removing values with unset() function34 Variables, requests, importing into global scope414 variables, scope of3164—66 Variables, session, registering182183 Variables, setting values of30 variables, static3265 Variables, syslog, defining393 variables, this144 Variables, variable, using with objects142 Variables_order directive in php.ini287 Variant type360 var_dump() function455 var_dump() function, displaying PHP values in human-readable form79 VBScript, converting to PHP COM function calls361 Verisign Payflow Pro extension466 Version of PHP parser432 Version of XML in processing instruction263 version_compare() function455 Vpopmail extension468 vprintf() function455 vsprintf() function455 Warnings303 Warnings, public visibility of, disabling for security purposes286 WBMP image format216 WBMP image format, output function for218 WDDX extension185468 Web applicationssee also "Applications" Web applications, Secure Sockets Layer (SSL)188 web applications, security285—296 Web applications, techniques158—188 Web applications, techniques, HTTP basics158 Web applications, techniques, HTTP response headers, setting175—178 Web applications, techniques, maintaining state178—188 Web applications, techniques, processing forms162—175 Web applications, techniques, server information160—162 Web applications, techniques, variables, EGPCS159 Web pages, embedding PHP in56—60 Web pages, embedding PHP in, ASP tags, using58 Web pages, embedding PHP in, echoing content directly59 Web pages, embedding PHP in, script style59 Web pages, embedding PHP in, SGML tags, using58 Web pages, embedding PHP in, XML-compliant tags, using57—58 Web pages, PDF files in233 Web serverssee also "Servers" Web servers, configuring PHP with352—354 Web servers, configuring PHP with, manually configuring Apache354 Web servers, configuring PHP with, manually configuring PWS353 Web servers, configuring PHP with, prepackaged distributions354 Web servers, configuring PHP with, using PHP installer353 Web servers, supporting PHP1 Web Services280—284 Web services, clients, XML-RPC (example)283 Web services, servers, XML-RPC (example)281 well-formed XML263 while loops50—52 While loops, continue statements in51 Whitespace in heredocs75 Whitespace in PHP code18 Whitespace in URLs224 whitespace, removing from strings80 whitespace, trimming from strings452 Windows systems, PHP on351—373 Windows systems, PHP on, configuring PHP with web server352—354 Windows systems, PHP on, configuring PHP with web server, manually configuring Apache354 Windows systems, PHP on, configuring PHP with web server, manually configuring PWS353 Windows systems, PHP on, configuring PHP with web server, prepackaged distributions354 Windows systems, PHP on, configuring PHP with web server, using PHP installer353 Windows systems, PHP on, extensions354 Windows systems, PHP on, installing PHP351 Windows systems, PHP on, interfacing with COM359 Windows systems, PHP on, interfacing with COM, API, determining361—363 Windows systems, PHP on, interfacing with COM, Excel files, reading and writing366 Windows systems, PHP on, interfacing with COM, ODBC data sources367—373 Windows systems, PHP on, interfacing with COM, PHP functions360 Windows systems, PHP on, interfacing with COM, Word document, completing363—366 Windows systems, PHP on, writing portable code for Windows and Unix355—359 Windows systems, PHP on, writing portable code for Windows and Unix, determining the platform355 Windows systems, PHP on, writing portable code for Windows and Unix, end-of-file handling358 Windows systems, PHP on, writing portable code for Windows and Unix, end-of-line handling358 Windows systems, PHP on, writing portable code for Windows and Unix, environment information356 Windows systems, PHP on, writing portable code for Windows and Unix, extensions, platform-specific359 Windows systems, PHP on, writing portable code for Windows and Unix, paths, handling across platforms356 Windows systems, PHP on, writing portable code for Windows and Unix, remote files357 Windows systems, PHP on, writing portable code for Windows and Unix, sending mail356 Windows systems, PHP on, writing portable code for Windows and Unix, server-specific functions356 Windows systems, PHP on, writing portable code for Windows and Unix, shell commands359 Word boundaries in POSIX regular expressions101 Word boundaries, \b and \B, in Perl-style regular expressions105 Word pronunciations in English, comparing to Soundex and Metaphone algorithms88 Word, completing a document with PHP363—366 Word, macro language, using to expose OLE COM objects and parameters361—363 Word, starting and adding "Hello, World" to document with COM360 Words in string, changing case of first character81 wordwrap() function456 Write handlers for sessions186 WWW-Authenticate header177 XML262—284 XML, DOM XML library460 XML, embedding PHP with XML-compliant tags57—58 XML, generating264 XML, Overview262—264 XML, overview, close tags263 XML, overview, DTD and Schema263 XML, overview, nesting documents263 XML, parsing265—277 XML, parsing, character data handler267 XML, parsing, creating a parser271 XML, parsing, default handler270 XML, parsing, element handlers266 XML, parsing, entity handlers268 XML, parsing, errors272 XML, parsing, methods as handlers273 XML, parsing, options270 XML, parsing, PHP's XML parser266 XML, parsing, processing instructions267 XML, parsing, sample application273—277 XML, parsing, XML parser extension468