arianhojat Posted September 5, 2006 Share Posted September 5, 2006 I read in php manual that the move_uploaded_file function...[quote]"checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism)."[/quote]Now I was wondering how to move a non-uploaded file as there is no move() function in php, I assume cause of security...What I would like to do is move a file in FILES array to a temp folder on upload. Then while doing some other code, if I figure out it needs to be moved again, move_uploaded_file doesnt seem to want to move it (since i assume its not a uploadedfile in /temp folder anymore).Anyone know a way past this? or should i just not move the file until i do all those 'code checks'.I am probably going to do all my validation 1st, before uploading the file now... but I was thinking it would still be useful for move a non-uploaded file even though its a php security restriction probably? Because when a user uploads a file, I would like to move the uploaded file, but also move the orig file (if it exists), to an archive directory and call it, filename[0].fileExt .I have seen php code that claims to do something like this, although I am not sure how they can move non-uploaded files. Quote Link to comment Share on other sites More sharing options...
arianhojat Posted September 5, 2006 Author Share Posted September 5, 2006 hmmm nvm i think i figured it out... rename function for moving files 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.