1.

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()This question was posed to me in an interview.This is a very interesting question from File System and PHP in section File and Session Handling in PHP of PHP

Answer»

Right option is (b) fwrite()

EXPLANATION: The function fwrite() writes to an OPEN FILE. This will stop at the end of the file or when it reaches the specified length, whichever comes first.



Discussion

No Comment Found

Related InterviewSolutions