How to display disallowed file type error message in case of upload in Codeigniter 3?
问题 I am working on a basic blog application with Codeigniter 3.1.8 and Bootstrap 4 . The posts, of course, have main images. There is a default image if no image is uploaded by the user but, if an image is uploaded, there are only 3 types allowed : jpg, jpeg and png. Wanting to warn the user in case she/he tries to upload other file formats, I did this in the Posts controller: // Upload image $config['upload_path'] = './assets/img/posts'; $config['allowed_types'] = 'jpg|jpeg|png'; $config['max