file_put_contents

(PHP 5, PHP 7) Write a string to a file int file_put_contents ( string $filename, mixed $data [, int $flags = 0 [, resource $context ]] ) This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file. If filename does not exist, the file is created. Otherwise, the existing file is overwritten, unless the FILE_APPEND flag is set. Parameters:

file_get_contents

(PHP 4 >= 4.3.0, PHP 5, PHP 7) Reads entire file into a string string file_get_contents ( string $filename [, bool $use_include_path = false [, resource $context [, int $offset = 0 [, int $maxlen ]]]] ) This function is similar to file(), except that file_get_contents() returns the file in a string, starting at the specified offset up to maxlen bytes. On failure, file_get_contents() will return FALSE. file_get_content

file_exists

(PHP 4, PHP 5, PHP 7) Checks whether a file or directory exists bool file_exists ( string $filename ) Checks whether a file or directory exists. Parameters: filename Path to the file or directory. On windows, use //computername/share/filename or \\computername\share\filename to check files on network shares. Returns: Returns TRUE if the file or

fgetss

(PHP 4, PHP 5, PHP 7) Gets line from file pointer and strip HTML tags string fgetss ( resource $handle [, int $length [, string $allowable_tags ]] ) Identical to fgets(), except that fgetss() attempts to strip any NUL bytes, HTML and PHP tags from the text it reads. Parameters: handle The file pointer must be valid, and must point to a file successfully opened by fopen() o

fgets

(PHP 4, PHP 5, PHP 7) Gets line from file pointer string fgets ( resource $handle [, int $length ] ) Gets a line from file pointer. Parameters: handle The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()). length Reading ends when length - 1 bytes have been

fgetcsv

(PHP 4, PHP 5, PHP 7) Gets line from file pointer and parse for CSV fields array fgetcsv ( resource $handle [, int $length = 0 [, string $delimiter = "," [, string $enclosure = '"' [, string $escape = "\" ]]]] ) Similar to fgets() except that fgetcsv() parses the line it reads for fields in CSV format and returns an array containing the fields read. Parameters: handle

fgetc

(PHP 4, PHP 5, PHP 7) Gets character from file pointer string fgetc ( resource $handle ) Gets a character from the given file pointer. Parameters: handle The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()). Returns: Returns a string containing a single character rea

fflush

(PHP 4 >= 4.0.1, PHP 5, PHP 7) Flushes the output to a file bool fflush ( resource $handle ) This function forces a write of all buffered output to the resource pointed to by the file handle. Parameters: handle The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()). Retur

feof

(PHP 4, PHP 5, PHP 7) Tests for end-of-file on a file pointer bool feof ( resource $handle ) Tests for end-of-file on a file pointer. Parameters: handle The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()). Returns: Returns TRUE if the file pointer is at EOF or an er

fclose

(PHP 4, PHP 5, PHP 7) Closes an open file pointer bool fclose ( resource $handle ) The file pointed to by handle is closed. Parameters: handle The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen(). Returns: Returns TRUE on success or FALSE on failure.