update lấy features từ ảnh upload

This commit is contained in:
2020-12-08 16:06:19 +07:00
parent 811ed32e04
commit f694e9fe71
5 changed files with 116 additions and 32 deletions

View File

@@ -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;
}
}