Skip to content

Instantly share code, notes, and snippets.

@endymion
Created April 19, 2012 17:56
Show Gist options
  • Select an option

  • Save endymion/2422618 to your computer and use it in GitHub Desktop.

Select an option

Save endymion/2422618 to your computer and use it in GitHub Desktop.
<?php
$structure = sys_get_temp_dir().'/bla';
if (is_dir($structure)) {
echo ('Directory exists: ' . $structure);
}
else {
if (!mkdir($structure, 0, true)) {
die('Failed');
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment