Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

PHP QUESTIONS : PART 29

Which function is used to open a file in PHP?

fopen() 

 feof()

fread()

SHOW ANSWER

What 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 ANSWER

Which function is used to create the directoriesin PHP?

mkdir()

 opendir() 

 fopen() 

SHOW ANSWER

Which function returns a line from an open file?

fgets() 

 fread() 

 fgetc()

SHOW ANSWER

Which function is used to delete files?

unlink()

 fgets()

flock()

SHOW ANSWER

Which function can be used to lock and release a lock?

flock()

unlink() 

fgets()

SHOW ANSWER

Which function is used for changing permissions on a file?

chmod() 

unlink()

 flock() 

SHOW ANSWER

fopen(“test.txt”,”r+”) open a file for

both reading & writing 

reading 

 writing

SHOW ANSWER

Which of the following mode of fopen() opens a file for both read and write?

r+ 

r

w

SHOW ANSWER

Which function is used for closing a file?

fclose() 

close() 

end()

SHOW ANSWER

Which 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+ 

 r+

SHOW ANSWER

Which 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 ANSWER

Which of the file mode used for write only to the end of a file whether it exists or not?

 w 

w+

SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in