PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




Filesystem Functions


The filesystem functions provide a wide range of tools to access and manipulate the filesystem.

OverviewPHP's filesystem functions provide a fairly broad range of functionality. All the standard functions that programmers expect are included - opening, reading, and writing files; querying the filesystem; changing permissions; copying and deleting files; etc. Many of these functions have been transparently extended to work with HTTP and FTP resources, allowing easy reading of remote files.

There are also a series of convenience functions like fgetcsv() , which parses CSV-format data while reading it from a file, and file() , which reads a file and then places it, line by line, into an array.

The group also includes some miscellaneous filesystem-related functions to generate names for temporary files ( tempnam() ) and open pipes to commands ( popen() ) . Note that most of the directory-related functions are documented in the Directory Functions module.

Configuring the Filesystem FunctionsThe following configuration directives can be used to control the behavior of the Filesystem functions.

Directive Name Value Type Description
allow_url_fopen boolean (on/off)

Allow the fopen-type functions to work with URLs.

i.e. $fp = fopen ('http://www.example.com', 'r');

Note

For PHP 4.0.3 and below you must use the --disable-url-fopen-wrapper configure option to disable this feature.



include_path string The paths to search when attempting to include or require a file. Certain other functions, like fopen() , may use these paths as well.
magic_quotes_runtime boolean (on/off) If this directive is enabled, data received from many functions that retrieve data from external sources (such as the database and program execution functions), will be automatically processed with the addslashes() function.
magic_quotes_sybase boolean (on/off) If magic_quotes_sybase is enabled, then single quotes escaped by magic_quotes_gpc or magic_quotes_runtime are escaped with a leading single quote instead of a backslash; '' instead of \'.
open_basedir string If this directive is set, PHP only allows access to files that are in or below the directories specified. The paths can be absolute (like /home/user) or relative (such as . or public_html) and are separated by a colon under UNIX-like operating systems and a semicolon under Windows operating systems (/home/:.:/opt/php/shared/).


Installing Filesystem SupportThese functions are built into PHP by default and can only be disabled by editing the source code and recompiling, or by using the disable_functions directive in php.ini.

Additional InformationFor more information, see:






PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.