CodeIgniter Image Upload - can't get error message to show

前端 未结 2 890
日久生厌
日久生厌 2021-01-28 12:41

This is my upload model

    function upload_avatar()
    {
        $id = $this->tank_auth->get_user_id();

        //config upload parameters and upload im         


        
2条回答
  •  遇见更好的自我
    2021-01-28 13:16

    Is your post_max_size limit less than 2MB? (http://ca3.php.net/manual/en/ini.core.php#ini.post-max-size) If so the file may have been discarded before your code is invoked.

    Update:

    If you take out your function call in the else block, and just drop in an exit('too big'); are you able to see errors then? If so there may be an issue with how you're pasing the call off.

提交回复
热议问题