Merge branch 'development' of http://git.westgis.ac.cn/westdc/westdc-core into development
This commit is contained in:
commit
d9e92d5435
|
@ -62,7 +62,7 @@ class Tools {
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function uuid()
|
static public function uuid()
|
||||||
{
|
{
|
||||||
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
|
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
|
||||||
// 32 bits for "time_low"
|
// 32 bits for "time_low"
|
||||||
|
@ -84,6 +84,19 @@ class Tools {
|
||||||
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
|
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给文件夹末尾加斜线
|
||||||
|
* @param $directory
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
static function dirSlash($directory){
|
||||||
|
if(!preg_match("/(\\/|\\\)$/",$directory))
|
||||||
|
{
|
||||||
|
$directory.="/";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $directory;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue