Upload class problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Upload class problem (/showthread.php?tid=3038) |
Upload class problem - El Forum - 09-06-2007 [eluser]emperius[/eluser] I need to upload few files at the same time. I made an arrray of input elements Code: <table width="700" border="0" cellpadding="5"> and in the controller I check if field is not empty and try to upload file. Code: if(!empty($_FILES['f'])) the permission for folder is set 777 and i don't get errors and data about successfull file upload What I'm doing wrong? Upload class problem - El Forum - 09-06-2007 [eluser]CI Lee[/eluser] Hey, I am very sleepy so bear with me. Where does your form open and close and do you have Code: enctype="multipart/form-data" -Lee Upload class problem - El Forum - 09-06-2007 [eluser]emperius[/eluser] [quote author="CI Lee" date="1189086951"]Hey, I am very sleepy so bear with me. Where does your form open and close and do you have Code: enctype="multipart/form-data" -Lee[/quote] of course I have everything. the opening tag, closing and enctype. Upload class problem - El Forum - 09-10-2007 [eluser]phpMaster[/eluser] hi! 1. make sure you have 'error_reporting(E_ALL); 2. put in some debugging 'echo' in various places in your code this way you can track where variables have bad values Example: Code: $field = "f[$i]"; you can echo TOTAL ARRAY content, if you wish in several stages of your script: I use this oneliner DUMP VALUES on my Windows PHP setup: Code: // $array can be any arrayname or variable Regards - phpMaster Upload class problem - El Forum - 09-11-2007 [eluser]ELRafael[/eluser] [quote author="emperius" date="1189082429"]I need to upload few files at the same time. I made an arrray of input elements Code: <table width="700" border="0" cellpadding="5"> and in the controller I check if field is not empty and try to upload file. Code: if(!empty($_FILES['f'])) the permission for folder is set 777 and i don't get errors and data about successfull file upload What I'm doing wrong?[/quote] teste if the conditions is true... ah! put a / in the line Code: $config['upload_path'] = realpath('public/object'); like this: Code: $config['upload_path'] = realpath('public/object/'); and try again! |