What are the key functions in PHP for file manipulation and creation?
One key function in PHP for file manipulation and creation is fopen(), which opens a file or URL for reading or writing. Another important function is fwrite(), which writes data to an open file. Lastly, fclose() is used to close an open file handle.
// Open a file for writing
$file = fopen("example.txt", "w");
// Write data to the file
fwrite($file, "Hello, World!");
// Close the file handle
fclose($file);