PHP File Handling


  1. Which one of the following function reads a directory into an Array?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    It returns an array consisting of files and directories found in directory or returns FALSE on error.


  1. Which function is useful when you want to output the executed command result?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    system()



  1. Which function sets the file filename last-modified and last-accessed times?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Its prototype is int touch(string filename [, int time [, int atime]]). It returns TRUE on success or FALSE on error.


  1. Which one of the following function outputs the contents of a string variable to the specified resource?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    fwrite()



  1. Which one of the following function operates similarly to fgets(), except that it also strips any HTML and PHP tags form the input?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    fgetss()