The filesize() function returns the file size in ___________
A. bits
B. bytes
C. kilobytes
D. gigabytes
Select an option to see the answer and solution.
Which one of the following PHP function is used to determine a file’s last access time?
A. fileltime()
B. filectime()
C. fileatime()
D. filetime()
Select an option to see the answer and solution.
Which one of the following function is capable of reading a file into an array?
A. file()
B. arrfile()
C. arr_file()
D. file_arr()
Select an option to see the answer and solution.
Which one of the following function is capable of reading a file into a string variable?
A. file_contents()
B. file_get_contents()
C. file_content()
D. file_get_content()
Select an option to see the answer and solution.
Which one of the following function is capable of reading a specific number of characters form a file?
A. fgets()
B. fget()
C. fileget()
D. filegets()
Select an option to see the answer and solution.
Which one of the following function operates similarly to fgets(), except that it also strips any HTML and PHP tags form the input?
A. fgetsh()
B. fgetsp()
C. fgetsa()
D. fgetss()
Select an option to see the answer and solution.
Which one of the following function outputs the contents of a string variable to the specified resource?
A. filewrite()
B. fwrite()
C. filewrites()
D. fwrites()
Select an option to see the answer and solution.
Which function sets the file filename’s last-modified and last-accessed times?
A. sets()
B. set()
C. touch()
D. touched()
Select an option to see the answer and solution.
Which function is useful when you want to output the executed command’s result?
A. out_cmm()
B. out_system()
C. cmm()
D. system()
Select an option to see the answer and solution.
Which one of the following function reads a directory into an Array?
A. scandir()
B. readdir()
C. scandirectory()
D. readdirectory()
Select an option to see the answer and solution.
Which of the following functions retrieve the entire contents of a file in such a way that it can be used as part of an expression?
1. file_get_contents()
2. fgets()
3. fopen()
4. file()
5. readfile()
A. Option 2 and 4
B. Option 1 and 5
C. Option 1 and 4
D. Option 3 and 4
Select an option to see the answer and solution.
fgets() is used to read a file one line at a time.
Select an option to see the answer and solution.
What is the difference between stat() and fstat()?
A. While stat() works on open file pointers, fstat() works on files specified by pathname
B. While fstat() works on open file pointers, stat() works on files specified by pathname
C. fstat() has nothing to do with files
D. stat() has nothing to do with files
E. fstat() is an alias of stat()
Select an option to see the answer and solution.
flock() is used to unlock a file so that two or more people do not get access to it at the same time.
Select an option to see the answer and solution.
Which of the following functions reads the entire contents of a file?
1. fgets()
2. file_get_contents()
3. fread()
4. readfile()
5. file()
A. Option 3 and 5
B. Option 1, 3 and 4
C. Option 2, 4 and 5
D. Option 2 and 4
Select an option to see the answer and solution.
What is the purpose of basename() function?
A. Returns the last accessed time of the file
B. Returns the first accessed time of the file
C. Strips of the path and returns the file name
D. Strips of the path and returns the folder name
Select an option to see the answer and solution.
What should you do if your script is having problem recognizing file endings from a text file saved on a platform different from the one you’re reading it on?
A. Change the auto_detect_line_endings INI setting
B. Use a regular expression to detect the last letter of a line
C. Use fpos()
D. Use ftok()
E. Read the file one character at a time
Select an option to see the answer and solution.
The ............ function checks if the "end-of-file" (EOF) has been reached.
A. f_eof()
B. f_of()
C. feofs()
D. feof()
Select an option to see the answer and solution.
The ........... function is used to read a single character from a file.
A. fgetc()
B. fgets()
C. fget()
D. fgetf()
Select an option to see the answer and solution.