18 questions for “File Handling & File System Functions”

Found in 1 field. Select a question to see its full answer.

Information Technology

18 questions in 1 technology

#QuestionTechnologyTopicLevel
1What security risks are associated with file handling operations that involve user supplied file paths, and how does path traversal attack prevention work? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsAdvanced
2How do you read the contents of a file in PHP using functions like file_get_contents and fopen? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsBeginner
3How do stream wrappers and stream contexts in PHP allow file functions to work seamlessly with non local resources like remote URLs or cloud storage? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsAdvanced
4How do you check whether a file or directory exists, and how do you retrieve useful metadata like a file's size or last modified time? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsIntermediate
5How do you write data to a file in PHP, and what is the difference between overwriting a file and appending to it? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsBeginner
6How do file locking mechanisms in PHP, using the flock function, help prevent data corruption when multiple processes might write to the same file concurrently? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsIntermediate
7How do you work with directories in PHP, including listing their contents, creating new directories, and recursively deleting them? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsIntermediate
8How do you move an uploaded file from its temporary location to a permanent storage location using move_uploaded_file? PHP › File Upload HandlingPHPFile Upload HandlingBeginner
9How should you validate an uploaded file's type and size before accepting it, and why is checking only the file extension considered insufficient for security? PHP › File Upload HandlingPHPFile Upload HandlingIntermediate
10How do you control the depth and formatting of json_encode output, such as pretty printing JSON for readability or handling deeply nested data structures? PHP › JSON Handling in PHPPHPJSON Handling in PHPIntermediate