How to encrypt/change the name of file when uploading in CI to avoid overwriting


When you are creating a page where the file is uploaded in the form and these files are saved on your server. Sometimes it happens that same name files overwrites the files. To avoid this just add the below line of code.


$config['encrypt_name'] = TRUE;

Leave a comment