RichE Posted October 13, 2006 Share Posted October 13, 2006 Hello, I have a weird problem. I have a script that uploads and image to a specified directory as well as a few other things, but a month ago it stopped working! No changes have been made to the file, but it doesn't work anymore! It may work once and a while, but most of the time it will not upload.The upload script is in a /upload directory and is uploading to /images/reviewsHere is my code (filep is my upload form box name):[code]$folder = "../images/reviews/";move_uploaded_file($_FILES["filep"]["tmp_name"] , "$folder".$_FILES["filep"]["name"]);chmod("$folder".$_FILES["filep"]["name"],0644);echo "<p align=center>File ".$_FILES["filep"]["name"]." uploaded.<br />";[/code]I did try copy instead of move_uploaded_file, but it still did not work. This time I added error outputs, but nothing happened.:[code]$folder = "../images/reviews/";copy ($_FILES['filep']['tmp_name'] , "$folder".$_FILES['filep']['name']) or die ("Could not copy");chmod("$folder".$_FILES["filep"]["name"],0644);echo "<p align=center>File ".$_FILES["filep"]["name"]." uploaded.<br />";[/code]Can anyone see something wrong? It should work because it worked for MONTHS before it stopped working!Thank you for your time. Quote Link to comment https://forums.phpfreaks.com/topic/23817-image-upload-script-stopped-working/ Share on other sites More sharing options...
RichE Posted October 13, 2006 Author Share Posted October 13, 2006 Even if someone can confirm that the code is OK that would be great. I just need some feedback, ANY feedback.Thanks Quote Link to comment https://forums.phpfreaks.com/topic/23817-image-upload-script-stopped-working/#findComment-108634 Share on other sites More sharing options...
redarrow Posted October 14, 2006 Share Posted October 14, 2006 It's the form show us the form. Quote Link to comment https://forums.phpfreaks.com/topic/23817-image-upload-script-stopped-working/#findComment-108690 Share on other sites More sharing options...
RichE Posted October 15, 2006 Author Share Posted October 15, 2006 Here is the form.[code]<form action=reviewupload.php method=post enctype="multipart/form-data"><table border="0" cellspacing="0" align=center cellpadding="3" bordercolor="#cccccc"><tr><td>Title:</td><td><input type="text" name="Title" size=30 maxlength="200"></td></tr><tr><td>Release Date:</td><td><input type="text" name="Release_Date" size=30 maxlength="35"></td></tr><tr><td>Rating:</td><td><input type="text" name="Rating" size=30 maxlength="10"></td></tr><tr><td>Runtime:</td><td><input type="text" name="Runtime" size=30 maxlength="3"></td></tr><tr><td>Director:</td><td><input type="text" name="Director" size=30></td></tr><tr><td>Writer:</td><td><input type="text" name="Writer" size=30></td></tr><tr><td>Studio:</td><td><input type="text" name="Studio" size=30 maxlength="100"></td></tr><tr><td>Staring:</td><td><input type="text" name="Staring" size=30></td></tr><tr><td>Reviewer:</td><td><input type="text" name="Reviewer" size=30 maxlength="10"></td></tr><tr><td>Picture:</td><td><input type="file" name="filep" size=30></td></tr><tr><td>Description:</td><td><textarea cols="30" rows="7" name="Description"></textarea></td></tr><tr><td>Final Comments:</td><td><textarea cols="30" rows="7" name="Final_Comments"></textarea></td></tr><tr><td>Rating:</td><td><input type="text" name="Rating" size=30 maxlength="3"></td></tr><tr><td colspan=2><p align=center><input type=submit name=action value="Load"></td></tr></table></form>[/code]Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/23817-image-upload-script-stopped-working/#findComment-109039 Share on other sites More sharing options...
RichE Posted October 17, 2006 Author Share Posted October 17, 2006 No one can spot anything wrong? Quote Link to comment https://forums.phpfreaks.com/topic/23817-image-upload-script-stopped-working/#findComment-110155 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.