how to upload doc, xls, ppt file ? - 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: how to upload doc, xls, ppt file ? (/showthread.php?tid=37586) |
how to upload doc, xls, ppt file ? - El Forum - 01-14-2011 [eluser]mahe11[/eluser] hi all i want to upload a document file like doc, ppt , xls, and pdf file. plz help me... Thanks in advance. how to upload doc, xls, ppt file ? - El Forum - 01-14-2011 [eluser]Cristian Gilè[/eluser] After submit your form, before to call the upload library, echo Code: $_FILES[‘userfile’][‘type’] Cristian Gilè how to upload doc, xls, ppt file ? - El Forum - 01-24-2011 [eluser]mahe11[/eluser] Hi Cristian Gilè, I use your suggestion Code: $_FILES[‘userfile’][‘type’] Code: A PHP Error was encountered I also try... Code: echo $HTTP_POST_FILES["userfile"]; but gives same error... my HTML code is Code: <input type="file" name="userfile" id="userfile" /> where is problem? plz help me. how to upload doc, xls, ppt file ? - El Forum - 01-24-2011 [eluser]InsiteFX[/eluser] userfile is the name of the file that you want to upload! Change userfile to the name of your file! InsiteFX how to upload doc, xls, ppt file ? - El Forum - 01-24-2011 [eluser]mahe11[/eluser] hi InsiteFX Sir, one new problem i have face one more problem for uploading file, in Google chrome file cant upload but in Mozilla it upload :roll: why it happen? And also it upload only in localhost... not in my webhost. plz help me... how to upload doc, xls, ppt file ? - El Forum - 01-24-2011 [eluser]InsiteFX[/eluser] Try this! controller upload.php: Code: class Upload extends Controller { view upload_form: Code: <html> view upload_success: Code: <html> make sure that the uploads directory is writeable! echo out what you are getting! InsiteFX how to upload doc, xls, ppt file ? - El Forum - 01-24-2011 [eluser]mahe11[/eluser] I take help that from Codeigniter user guide. and use already. how to upload doc, xls, ppt file ? - El Forum - 01-24-2011 [eluser]Cristian Gilè[/eluser] [quote author="InsiteFX" date="1295880633"]userfile is the name of the file that you want to upload! Change userfile to the name of your file! InsiteFX[/quote] WRONG!!! userfile is the file field name not the name of the file. To access the file name use Code: $_FILES['userfile']['name'] Cristian Gilè how to upload doc, xls, ppt file ? - El Forum - 01-24-2011 [eluser]InsiteFX[/eluser] What can I say, It was long night LOL. InsiteFX |