![]() |
File (Image) Upload - 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: File (Image) Upload (/showthread.php?tid=55820) |
File (Image) Upload - El Forum - 11-11-2012 [eluser]KrYpToNiT3[/eluser] See my Code, Code: $docidn = $this->input->post('doc_identity'); //reference to the private function The functions Code: private function upload_docs_idn(){ $docidn is always NULL, even If I select a file :/ what could be the problem ??? File (Image) Upload - El Forum - 11-11-2012 [eluser]xeroblast[/eluser] because $docidn is a $_FILES not a $_POST. File (Image) Upload - El Forum - 11-12-2012 [eluser]KrYpToNiT3[/eluser] now It works :/ though files are not uploaded, and this is returned http://localhost/direct/uploads/docs_identity/ ??? File (Image) Upload - El Forum - 11-14-2012 [eluser]KrYpToNiT3[/eluser] bump File (Image) Upload - El Forum - 11-14-2012 [eluser]Mbugua[/eluser] function do_upload() {//Instead of $config['upload_path'] = 'http://localhost/mysite/mydiirectory' $config['upload_path'] = './uploads/';//use this for directory $config['file_name']=$_FILES['userfile']['name']; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '2000'; $config['max_width'] = '680'; $config['max_height'] = '480'; $this->load->library('upload', $config); ......} File (Image) Upload - El Forum - 11-14-2012 [eluser]Narf[/eluser] [quote author="KrYpToNiT3" date="1352721310"]now It works :/ though files are not uploaded, and this is returned http://localhost/direct/uploads/docs_identity/ ???[/quote] You know only you can access your localhost, right? File (Image) Upload - El Forum - 11-15-2012 [eluser]Mbugua[/eluser] is your file upload directory.../uploads/docs_identity/ or what is it?? try referencing it as $config[‘upload_path’] = ‘./uploads/docs_identity’;//use this for directory |