also passt mal auf,
ich will doch nur eine file löschen, wofür brauch ich dann sowas:
// Searches PHP's include_path variable for the existance of a file
// Returns the filename if it's found, otherwise FALSE.
// Only works on a *nix-based filesystem
// Check like: if (($file = file_exists_path('PEAR.php')) !== FALSE)
function file_exists_path($file) {
// Absolute path specified
if (substr($path,0,1)=='/')
return (file_exists($file))?realpath($file):FALSE;
$paths = explode(':',ini_get('include_path'));
foreach ($paths as $path) {
if (substr($path,-1)!='/') $path = "$path/";
if (file_exists("$path$file"))
return realpath("$path$file");
}
return FALSE;
}
checks halt auf keinem Aug!!!
Gruß Basti