Files

These functions manipulate or return information about files. Many of them are wrappers for the commands you execute in a UNIX or Windows command shell.

When the functions in this section call for a filename or a directory, you may name a file in the same directory as the script itself. You may also use a full or relative path. The . and .. directories are valid in both UNIX and Windows. You may also specify drive letters on a Windows machine. Backslashes can delimit directories and filenames when running under Windows, but forward slashes are interpreted correctly, so you stick with them.

boolean chdir(string directory)

When a PHP script begins to execute, its default path is the path to the script itself. That is, if the fully qualified ...

Get Core PHP Programming: Using PHP to Build Dynamic Web Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.