Which function is used to open a file in PHP?
fopen()
feof()
fread()
SHOW ANSWERWhat is the correct way to open the file “time.txt” as readable?
fopen(“time.txt”,”r”)
fopen(“time.txt”,”r+”)
fopen(“time.txt”,”read”)
SHOW ANSWERWhich function is used to create the directoriesin PHP?
mkdir()
opendir()
fopen()
SHOW ANSWERWhich function returns a line from an open file?
fgets()
fread()
fgetc()
SHOW ANSWERWhich function is used to delete files?
unlink()
fgets()
flock()
SHOW ANSWERWhich function can be used to lock and release a lock?
flock()
unlink()
fgets()
SHOW ANSWERWhich function is used for changing permissions on a file?
chmod()
unlink()
flock()
SHOW ANSWERfopen(“test.txt”,”r+”) open a file for
both reading & writing
reading
writing
SHOW ANSWERWhich of the following mode of fopen() opens a file for both read and write?
r+
r
w
SHOW ANSWERWhich function is used for closing a file?
fclose()
close()
end()
SHOW ANSWERWhich of the file mode is used for write only and will create a file of this name, if one doesn’t already exist, and will erase the contents any file of this name before writing?
w
w+
r+
SHOW ANSWERWhich of the file mode used for write and read even if the file doesn’t exist already will create a file of this name?
w+
w
r+
SHOW ANSWERWhich of the file mode used for write only to the end of a file whether it exists or not?
a
w
w+
SHOW ANSWER