Functions: Created is_uuid() function for validation.
This commit is contained in:
parent
d79b45663e
commit
4034401e14
|
|
@ -106,6 +106,14 @@
|
|||
//echo uuid();
|
||||
}
|
||||
|
||||
if (!function_exists('is_uuid')) {
|
||||
function is_uuid($uuid) {
|
||||
//uuid version 4
|
||||
$regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i';
|
||||
return preg_match($regex, $uuid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('recursive_copy')) {
|
||||
function recursive_copy($src,$dst) {
|
||||
$dir = opendir($src);
|
||||
|
|
|
|||
Loading…
Reference in New Issue