Page 297 - Computer Software Application TP - Volume 1
P. 297
COMPUTER SOFTWARE APPLICATION - CITS
1 Provide a code example demonstrating how to create a directory named “uploads” within the current working
directory.
2 Provide a code example demonstrating how to list the contents of a directory named “images”.
3 Provide a code example demonstrating how to delete a directory named “temp” and its contents.
4 Provide a code example demonstrating how to open a file named “example.txt” in read mode.
5 Provide a code example demonstrating how to read each line from a file handle using the fgets() function.
6 Provide a code example demonstrating how to use the file_get_contents()
7 Provide a code example demonstrating how to use the fwrite() function to write a string to a file handle.
8 Provide a code example demonstrating how to open a file in append mode (“a”) and write text content to it.
9. Provide a code example demonstrating how to delete a file named “example.txt” from the filesystem.
282
CITS : IT & ITES - Computer Software Application - Exercise 55