PHP File Handling
PHP File Handling - Important Points
11. | What is the function used to get the size of a file in PHP? |
---|
A. filesize()
B. file_get_size()
C. file_size()
D. get_file_size()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
filesize() is the function used to get the size of a file in PHP.
12. | What is the function used to read the entire contents of a file into a string in PHP? |
---|
A. file_get_contents()
B. file_put_contents()
C. fread()
D. fgets()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
file_get_contents() is the function used to read the entire contents of a file into a string in PHP.
13. | What is the function used to write a string to a file in PHP? |
---|
A. file_put_contents()
B. file_get_contents()
C. fwrite()
D. fgets()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
file_put_contents() is the function used to write a string to a file in PHP.
14. | What is the function used to get the current position of the file pointer in PHP? |
---|
A. ftell()
B. fseek()
C. rewind()
D. fgetpos()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
ftell() is the function used to get the current position of the file pointer in PHP.
15. | What is the function used to move the file pointer to a specified position in PHP? |
---|
A. fseek()
B. ftell()
C. rewind()
D. fsetpos()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
fseek() is the function used to move the file pointer to a specified position in PHP.