Source Code:
(back to article)
<?php $dirname = "example_dir"; if (file_exists($dirname) && is_dir($dirname)) { echo "The directory '$dirname' exists." . PHP_EOL; } else { echo "The directory '$dirname' does not exist." . PHP_EOL; }
Result:
Report an issue