You can easily generate random string using security class.
Yii2 generate unique number
$string = Yii::$app->security->generateRandomString(12); print_r($string); //result JCt-5GeUlR8q
use yii\web\Session; $session = Yii::$app->session; // start session $session->open(); // close session $session->close(); ...
Yii2 is the best PHP Framework I have ever used. OOP in action.
ReplyDelete
ReplyDeleteWonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!
PHP Database Development in India