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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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 ]] )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is function feof(resource $ handle)

A

feof — Tests for end-of-file on a file pointer and returns Boolean.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the fgetc() function do?

A
String fgetc( resource $handle) 
Gets character from file pointer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the use of the function file_exists() ?

A

file_exists ( string file name)— Checks whether a file or directory exists.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly