FalseProphet Posted January 1, 2011 Share Posted January 1, 2011 I need a way a user can upload a file onto my website(it's a shared site, I believe, but I own the domain), I've tried using the cURL library but it seems a bit over my head at the moment. And everything I tried with it would not result in a file being uploaded into any folder. What can I do what I need? I've searched around and never found anything that worked for me. Quote Link to comment https://forums.phpfreaks.com/topic/223109-how-can-i-upload-a-user-selected-file-without-enabling-allow_url_fopen/ Share on other sites More sharing options...
trq Posted January 1, 2011 Share Posted January 1, 2011 allow_url_fopen & curl have nothing to do with file uploading. I also refuse to believe that a Google search of 'php file upload' produced no results for you when I get over 33 million results, with this being the very first one. Quote Link to comment https://forums.phpfreaks.com/topic/223109-how-can-i-upload-a-user-selected-file-without-enabling-allow_url_fopen/#findComment-1153464 Share on other sites More sharing options...
litebearer Posted January 1, 2011 Share Posted January 1, 2011 http://www.tizag.com/phpT/fileupload.php Quote Link to comment https://forums.phpfreaks.com/topic/223109-how-can-i-upload-a-user-selected-file-without-enabling-allow_url_fopen/#findComment-1153465 Share on other sites More sharing options...
FalseProphet Posted January 1, 2011 Author Share Posted January 1, 2011 allow_url_fopen & curl have nothing to do with file uploading. I also refuse to believe that a Google search of 'php file upload' produced no results for you when I get over 33 million results, with this being the very first one. It's good that you refuse to believe this since I never said any such thing. I simply said that it produced nothing that would work for me(out of my own stupidity, probably as I am still very new to web development). I receive this warning whenever I use move_uploaded_file: Warning: move_uploaded_file() [function.move-uploaded-file]: URL file-access is disabled in the server configuration Which is why I added allow_url_fopen in my topic. I thought the two were correlated together. Quote Link to comment https://forums.phpfreaks.com/topic/223109-how-can-i-upload-a-user-selected-file-without-enabling-allow_url_fopen/#findComment-1153472 Share on other sites More sharing options...
trq Posted January 1, 2011 Share Posted January 1, 2011 Post some relevant code. Quote Link to comment https://forums.phpfreaks.com/topic/223109-how-can-i-upload-a-user-selected-file-without-enabling-allow_url_fopen/#findComment-1153473 Share on other sites More sharing options...
FalseProphet Posted January 1, 2011 Author Share Posted January 1, 2011 I tried the tizag code and it worked just fine. The code I was using was near identical except I wasn't using basename(). I think my problem was CHMOD in the folder not being set by filezilla(it seems to take several attempts to get it to set..). Quote Link to comment https://forums.phpfreaks.com/topic/223109-how-can-i-upload-a-user-selected-file-without-enabling-allow_url_fopen/#findComment-1153477 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.