Snooble Posted December 8, 2008 Share Posted December 8, 2008 Hey. Here's the part of the code I'm having trouble with. The php file is ran from /includes/check.php I want the uploaded file to be moved to /uploads/FILENAME.EXT At the moment is goes to: /includes/uploads/FILENAME.EXT $newname = dirname(__FILE__).'../uploads/'.$filename; Thanks Snoobs Quote Link to comment https://forums.phpfreaks.com/topic/136047-directory-transversal-php-upload/ Share on other sites More sharing options...
PravinS Posted December 8, 2008 Share Posted December 8, 2008 $newname = dirname(__FILE__).'/uploads/'.$filename; Quote Link to comment https://forums.phpfreaks.com/topic/136047-directory-transversal-php-upload/#findComment-709338 Share on other sites More sharing options...
Snooble Posted December 8, 2008 Author Share Posted December 8, 2008 as i said.. that uploads the file in "/includes/uploads/FILENAME.EXT" i need to put the directory back one first! Thanks though Snoobs Quote Link to comment https://forums.phpfreaks.com/topic/136047-directory-transversal-php-upload/#findComment-709341 Share on other sites More sharing options...
The Little Guy Posted December 8, 2008 Share Posted December 8, 2008 $newname = '/uploads/'.$filename; OR $newname = '../uploads/'.$filename; Quote Link to comment https://forums.phpfreaks.com/topic/136047-directory-transversal-php-upload/#findComment-709433 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.