The filesystem functions allow you to access and manipulate the filesystem
The filesystem functions are part of the PHP core. There is no installation needed to use these functions.
When specifying a path on Unix platforms, a forward slash (/) is used as directory separator. On Windows platforms, both forward slash (/) and backslash (\) can be used.
The behavior of the filesystem functions is affected by settings in php.ini. Filesystem configuration options:
Name | Default | Description | Changeable |
---|---|---|---|
allow_url_fopen | "1" | Allows fopen()-type functions to work with URLs (available since PHP 4.0.4) | PHP_INI_SYSTEM |
user_agent | NULL | Defines the user agent for PHP to send (available since PHP 4.3) | PHP_INI_ALL |
default_socket_timeout | "60" | Sets the default timeout, in seconds, for socket based streams (available since PHP 4.3) | PHP_INI_ALL |
from | "" | Defines the anonymous FTP password (your email address) | PHP_INI_ALL |
auto_detect_line_endings | "0" | When set to "1", PHP will examine the data read by fgets() and file() to see if it is using Unix, MS-Dos or Mac line-ending characters (available since PHP 4.3) | PHP_INI_ALL |