base\Security generateRandomString()

generateRandomString() public method

Generates a random string of specified length.

The string generated matches [A-Za-z0-9_-]+ and is transparent to URL-encoding.

public string generateRandomString ( $length = 32 )
$length integer

The length of the key in characters

return string

The generated random key

throws yii\base\Exception

on failure.

doc_Yii
2016-10-30 16:52:21
Comments
Leave a Comment

Please login to continue.