";
if (is_readable($filename)) {
echo "The file is readable.
";
} else {
echo "The file cannot be read.
";
}
if (is_writable($filename)) {
echo "The file is writable.
";
} else {
echo "The file cannot be written to.
";
}
echo "File size: " . filesize($filename) . " bytes.
";
} else {
echo "The file '$filename' does not exist. Creating it...
";
if (touch($filename)) {
echo "The file '$filename' has been created.
";
} else {
echo "Failed to create the file.
";
}
}
?>