PHP File Handling


  1. Which one of the following function is capable of reading a specific number of characters from a file?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Its prototype is string fgets(resource handle [, int length]). If the optional length parameter is omitted, 1024 character is assumed.


  1. Which one of the following function is capable of reading a file into a string variable?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    file_get_contents()



  1. Which one of the following function is capable of reading a file into an array?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    file()


  1. Which one of the following PHP function is used to determine a file’s last access time?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The fileatime() function returns a file’s last access time in Unix timestamp format or FALSE on error.



  1. The filesize() function returns the file size in ___________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    bytes