The Little Guy Posted December 28, 2006 Share Posted December 28, 2006 Errors:[code]Warning: move_uploaded_file(users/ryan/) [function.move-uploaded-file]: failed to open stream: Permission denied in C:\Program Files\xampp\htdocs\tzfiles\upload_files.php on line 70Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Program Files\xampp\tmp\php26A.tmp' to 'users/ryan/' in C:\Program Files\xampp\htdocs\tzfiles\upload_files.php on line 70[/code]Line 70:[code]move_uploaded_file($tmp_name, "users/$_SESSION[user]/".strtolower($new_name));[/code]Hard drive location to save:[code]C:\Program Files\xampp\htdocs\tzfiles\users\ryan[/code]The running script is at this location:[code]C:\Program Files\xampp\htdocs\tzfiles[/code]It seems right, what could the problem be? Link to comment https://forums.phpfreaks.com/topic/32015-solved-warning-help/ Share on other sites More sharing options...
Orio Posted December 28, 2006 Share Posted December 28, 2006 The folder you are moving the file to must have permission to move files to it. You can do it manually using your ftp, or by using chmod().Orio. Link to comment https://forums.phpfreaks.com/topic/32015-solved-warning-help/#findComment-148637 Share on other sites More sharing options...
The Little Guy Posted December 28, 2006 Author Share Posted December 28, 2006 but it does have permissions, because I use that on line 56 too, and it uploads the file.b.t.w.Line 56: file renameLine 70: file overwrite Link to comment https://forums.phpfreaks.com/topic/32015-solved-warning-help/#findComment-149017 Share on other sites More sharing options...
The Little Guy Posted December 28, 2006 Author Share Posted December 28, 2006 ah... never mind I figured it out!I had the variable $new_name in the wrong spot, so it wasn't making the file name correctly! Link to comment https://forums.phpfreaks.com/topic/32015-solved-warning-help/#findComment-149020 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.