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!?"; } } Quote Link to comment Share on other sites More sharing options...
marcus Posted September 13, 2007 Share Posted September 13, 2007 CHMOD the folder to 777 Quote Link to comment 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.