7 public static function recursiveDelete($path)
9 if (!is_dir($path) || is_link($path)) {
12 foreach (scandir($path) as $file) {
13 if ($file == '.' || $file == '..') {
16 $filepath = $path . DIRECTORY_SEPARATOR . $file;
17 if (!static::recursiveDelete($filepath)) {
25 * Create a full URL with protocol and host name
27 * @param string $path Path to the file, with leading /
29 * @return string Full URL
31 public static function fullUrl($path)
33 if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {
38 return $prot . '://' . $_SERVER['HTTP_HOST'] . $path;