Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php directory exists

$directory = "/var/www/videos/";
if (file_exists($directory) && is_dir($directory))
{
  echo "Sure, exists and is dir";
}else{
  echo "Not exists. Creating...";
  mkdir($directory, 0777, true);
}
 
PREVIOUS NEXT
Tagged: #php #directory #exists
ADD COMMENT
Topic
Name
8+9 =