flashmonkey Posted December 24, 2007 Share Posted December 24, 2007 My image upload script has suddenly stopped working. I tried a lot of things but then i found that my hosting providers have disabled 'allow_url_fopen' for security concerns. I'm stuck with my users unable to upload their images. Is there a way around. Any help will be highly appreciated. Here is the code: $register = $_POST['submit']; if(isset($register)){ $photo_name = $_FILES['photo1']['name']; $photo_type = $_FILES['photo1']['type']; $photo_size = $_FILES['photo1']['size']; $photo_temp_name = $_FILES["photo1"]["tmp_name"]; $photo_error = $_FILES["photo1"]["error"]; $target_path = "http://www.loveisinair.com/home/loveisin/public_html/upload1/".basename($photo_name); $upload =move_uploaded_file($photo_temp_name, $target_path); if(empty($upload)){ $error = "Error: Your image did not upload."; } Thanks in advance! flashmonkey@rediffmail.com Quote Link to comment https://forums.phpfreaks.com/topic/83058-need-urgent-help/ Share on other sites More sharing options...
shocker-z Posted December 24, 2007 Share Posted December 24, 2007 ftp? Just an idea not sure if that will have been disabled also tho.. Liam Quote Link to comment https://forums.phpfreaks.com/topic/83058-need-urgent-help/#findComment-422501 Share on other sites More sharing options...
corbin Posted December 24, 2007 Share Posted December 24, 2007 I'm pretty sure move_uploaded_file doesn't support URLs x.x lol..... You might want to consider using a local path. Quote Link to comment https://forums.phpfreaks.com/topic/83058-need-urgent-help/#findComment-422503 Share on other sites More sharing options...
shocker-z Posted December 24, 2007 Share Posted December 24, 2007 I'm pretty sure move_uploaded_file doesn't support URLs x.x lol..... You might want to consider using a local path. Yeah i thought that too but didnt want to sound daft lol you would have to move locally then fopen/fputs to upload to server to FTP Liam Quote Link to comment https://forums.phpfreaks.com/topic/83058-need-urgent-help/#findComment-422504 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.