Source Code:
(back to article)
<?php // Create an empty file named "example.txt" file_put_contents('example.txt', ''); // Check if the file was created if (file_exists('example.txt')) { echo "Empty file created successfully."; } else { echo "Failed to create empty file."; }
Result:
Report an issue