![]() |
[solved]Upload not working - 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: [solved]Upload not working (/showthread.php?tid=21382) |
[solved]Upload not working - El Forum - 08-08-2009 [eluser]Clooner[/eluser] I use the upload library but somehow it says the directory is not correct. I checked this using the file helper and writing a file to that directory. Writing the file works so, I must be overlooking something in the upload library. Anyone ideas? Code: function images($id) [solved]Upload not working - El Forum - 08-08-2009 [eluser]Jondolar[/eluser] I would echo out the return value from the image_path() function to make sure it has what you expect. [solved]Upload not working - El Forum - 08-09-2009 [eluser]Clooner[/eluser] [quote author="Jondolar" date="1249796206"]I would echo out the return value from the image_path() function to make sure it has what you expect.[/quote] I do echo the upload path and that is correct. I even use the img_path var and the file helper to write a file in that directory. The directory is chmod 777 and writable using the file helper. How come I cannot access it using the upload library? [solved]Upload not working - El Forum - 08-09-2009 [eluser]Clooner[/eluser] The weird thing is that when I use the native php function it works flawless Code: if(move_uploaded_file($_FILES['userfile']['tmp_name'],img_path().$id.'/test.jpg'))//$chmod o+rw galleries [solved]Upload not working - El Forum - 08-09-2009 [eluser]Clooner[/eluser] Seems that I never initiated the config file... (Maybe this could also be a error of the upload library) I used a MY_upload library to extend the error handling a bit. I forgot to correctly pass through the $config array.... |