Random String Generator : CI Helper File



Now, I have this small helper file that I used in a project I was working on using codeigniter where I generated random strings which were used as activation code of users. The helper file is embeded as follows: Using this is very easy just copy the code in a file rand_helper.php and put it in helpers directory and load the helper file using $this->load->helper('rand_helper') and call the function generateRandomString()or with length of string to be generated generateRandomString(15). THe default length of string is 10. Its documented in the helper file too. If you need to modify it, please go ahead. :)

Comments

Popular posts from this blog

Automate file upload in Selenium IDE

How To Install and Configure Nextcloud