??? File I/O: You??™ll learn how to interact with data files, which will let you perform a
variety of practical tasks, including creating, deleting, reading, and writing files.
??? Directory contents: You??™ll learn how to easily retrieve directory contents.
278 CHAPTER 10 ?– WORKING WITH THE FI LE AND OPERATING SYSTEM
??? Shell commands: You can take advantage of operating system and other
language-level functionality from within a PHP application through a number
of built-in functions and mechanisms.
??? Sanitizing input: Although Chapter 21 goes into this topic in further detail,
this chapter demonstrates some of PHP??™s input sanitization capabilities,
showing you how to prevent users from passing data that could potentially
cause harm to your data and operating system.
?– Note PHP is particularly adept at working with the underlying file system, so much so that it is
gaining popularity as a command-line interpreter, a capability introduced in version 4.2.0. This topic
is beyond the scope of this book, but you can find additional information in the PHP manual.
Learning About Files and Directories
Organizing related data into entities commonly referred to as files and directories has
long been a core concept in the computing environment. For this reason, programmers
need to have a means for obtaining important details about files and directories, such as
location, size, last modification time, last access time, and other defining information.
Pages:
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353