![]() |
Problem in uploading image - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem in uploading image (/showthread.php?tid=32363) |
Problem in uploading image - El Forum - 07-21-2010 [eluser]silent_assassin[/eluser] I m trying to write a simple program that uploads an image to a directory.when i press submit button i get following error message. Quote:Fatal error: Call to undefined method CI_Upload::insert() in C:\wamp\www\code\system\application\models\post_data.php on line 11This is my model Code: <?php Code: <?php Code: <html> Problem in uploading image - El Forum - 07-21-2010 [eluser]silent_assassin[/eluser] any ideas? Problem in uploading image - El Forum - 07-21-2010 [eluser]mddd[/eluser] In your model you say : $this->upload->insert(); But there is no 'insert' method in the upload class. Perhaps you meant : $this->upload->do_upload(); ?? Seems simple to me, if you just read the line of your code that is mentioned in the error message. Problem in uploading image - El Forum - 07-21-2010 [eluser]silent_assassin[/eluser] Thanks for your help.I changed the method.Program runs without any errors.But $this->upload->data() returns an empty array and image is not uploaded. Problem in uploading image - El Forum - 07-21-2010 [eluser]mddd[/eluser] Could be many things. Look at the errors to see what is wrong: $this->upload->display_errors(); |