PHP Filesystem functions

F

fclose()

The PHP fclose() function closes an open file handle.

file_exists()

The PHP file_exists() function checks whether a file or directory exists.

file_get_contents()

The PHP file_get_contents() function reads the entire file or URL into a string.

file_put_contents()

The PHP file_put_contents() function writes data to a file.

fopen()

The PHP fopen() function opens a file or URL and returns a file handle.

fread()

The PHP fread() function reads a specified number of bytes from an open file pointer.

fwrite()

The PHP fwrite() function writes data to an open file pointer.

I

is_dir()

The PHP is_dir() function checks whether a path is a directory.

is_file()

The PHP is_file() function checks whether a path is a regular file.

U

unlink()

The PHP unlink() function deletes a file.