<?php
$filename = 'readme.txt';
if (file_exists($filename)) {
$message = "The file $filename exists";
} else {
$message = "The file $filename does not exist";
}
echo $message;
Code language: HTML, XML (xml)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter