update lấy features từ ảnh upload
This commit is contained in:
@@ -181,4 +181,14 @@ class common extends \yii\db\ActiveRecord {
|
||||
]));
|
||||
}
|
||||
|
||||
public static function generateRandomString($length = 10) {
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
return $randomString;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user