bizerk Posted October 1, 2006 Share Posted October 1, 2006 Well first off i am trying to make a type of image uploader where when uploaded it stores into a variable called which file, and than is renamed into a folder called PUBLIC with the extension at the end and everything. The script works with this but i am trying to back it up into each user's SPECIFIC folder as well. If i replace the two in the first rename it will work, but it's when i try to COPY the image and than RENAME it again is where it screws up. here is the code snippet:[code]$public = "users/public"; rename($user_dat['usrdir'] . "/" . $_FILES[$whichfile]['name'], $public . "/" . $split_img[0] . "." . strtolower($split_img[1])); copy($_FILES[$whichfile]['tmp_name'], $user_dat['usrdir'] . "/" . $_FILES[$whichfile]['name']), $lol . "/" . $split_img[0] . "." . strtolower($split_img[1])); rename($lol . "/" . $split_img[0] . "." . strtolower($split_img[1])), $user_dat['usrdir'] . "/" . $split_img[0] . "." . strtolower($split_img[1])); chmod($public . "/" . $split_img[0] . "." . strtolower($split_img[1])), 0644); chmod($user_dat['usrdir'] . "/" . $split_img[0] . "." . strtolower($split_img[1])), 0644);[/code] 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.