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: Image Upload (/showthread.php?tid=2652) |
Image Upload - El Forum - 08-16-2007 [eluser]MMCCQQ[/eluser] hi im workin in a proyect with CI. i dont know how upload a image to a Folder. i need to know how create a Folder with CI ex: image/username/username.jpg image/MMCCQQ/MMCCQQ.jpg Image Upload - El Forum - 08-16-2007 [eluser]Michael Wales[/eluser] PHP.net: mkdir() Image Upload - El Forum - 08-16-2007 [eluser]MMCCQQ[/eluser] [quote author="walesmd" date="1187298203"]PHP.net: mkdir()[/quote] i know use mkdir but how can i integrate with CI? Image Upload - El Forum - 08-16-2007 [eluser]Derek Allard[/eluser] consider the file helper. write_file('path', $data) Quote:Writes data to the file specified in the path. If the file does not exist the function will create it. Image Upload - El Forum - 08-16-2007 [eluser]batteries[/eluser] I apologize in advance for being so blunt, but RTFM Image Upload - El Forum - 08-16-2007 [eluser]MMCCQQ[/eluser] <form action="register" method="POST" enctype="multipart/form-data" > <table> <tr> <td class="sti" >Your Avastar:</td> <td><input type="file" name="user_pic"/></td> </tr> </table> <input type="submit" id="button" value="Upload" /> </form> how i get user_pic file? Image Upload - El Forum - 08-16-2007 [eluser]MMCCQQ[/eluser] i got this function Code: function Upload() create a folder with the id of the member. will work? Image Upload - El Forum - 08-23-2007 [eluser]MMCCQQ[/eluser] dont work with this $config['upload_path'] = "/home/txxx/public_html/img/".$id; and work without ; $id but i need to know the id of img ex: /img/15/MMCCQQ_thumb.jpg Code: $config['upload_path'] = "/home/txxx/public_html/img/".$id; Image Upload - El Forum - 08-23-2007 [eluser]gunter[/eluser] Code: _function Init_Directories($dir) I found an old function, I hope it works call it with: Code: $uploadPath ='this/is/the/path/that/will/be/created/image/username'; this this/is this/is/the... and so on Image Upload - El Forum - 08-24-2007 [eluser]MMCCQQ[/eluser] how i add the "id"? i cant do this Code: = "/home/txxx/public_html/img/".$id; |