Use checkfile on get.php

Move checkfile to funcs.php to be used by more scripts
This commit is contained in:
Mcat12
2016-12-21 12:24:48 -05:00
parent 8b59998299
commit 977c026868
3 changed files with 18 additions and 14 deletions
+13 -1
View File
@@ -7,4 +7,16 @@ function is_valid_domain_name($domain_name)
preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $domain_name)); //length of each label
}
?>
function checkfile($filename) {
if(is_readable($filename))
{
return $filename;
}
else
{
// substitute dummy file
return "/dev/null";
}
}
?>