Files And Stream Flashcards
0
Q
What is ‘a’ mode for fopen() function used for?
A
‘a’ is for Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.
1
Q
What method is used for opening file or URL?
A
fopen()
fopen ( string $filename , string $mode [, bool $use_include_path = false [, resource $context ]] )
2
Q
What is function feof(resource $ handle)
A
feof — Tests for end-of-file on a file pointer and returns Boolean.
3
Q
What does the fgetc() function do?
A
String fgetc( resource $handle) Gets character from file pointer
4
Q
What is the use of the function file_exists() ?
A
file_exists ( string file name)— Checks whether a file or directory exists.