suttercain Posted September 13, 2007 Share Posted September 13, 2007 Is this something to do with the host? Warning: move_uploaded_file(../images/articles/phpGsDtno): failed to open stream: Permission denied in //IF THERE IS A FIRST PICTURE if ($_FILES['articlePicOne']) { $imageName = $gathered['articleId']; // PROCESS IMAGE $target_path = "../images/articles/"; $target_path = $target_path . basename( $_FILES['articlePicOne']['tmp_name']); $_FILES['articlePicOne']['tmp_name']; //MOVE THE IMAGE TO THUMBNAILS move_uploaded_file($_FILES['articlePicOne']['tmp_name'], $target_path); //EXPLODE TO RENAME IMAGE $fileName = $_FILES['articlePicOne']['name']; $broken = explode(".", $fileName); rename("../images/articles/".basename($_FILES['articlePicOne']['tmp_name'])."", "../images/articles/".$imageName."_01." .$broken[1].""); $update = mysql_query("UPDATE articles SET articlePicOne='" .$imageName."." .$broken[1]. "' WHERE articleId='".$imageName."'" ) or die(mysql_error()); if ($update) { echo "It worked!?"; } } Link to comment https://forums.phpfreaks.com/topic/69122-solved-uploading-file-moving-file-permission-error/ Share on other sites More sharing options...
marcus Posted September 13, 2007 Share Posted September 13, 2007 CHMOD the folder to 777 Link to comment https://forums.phpfreaks.com/topic/69122-solved-uploading-file-moving-file-permission-error/#findComment-347447 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.