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 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; 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 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; Link to comment https://forums.phpfreaks.com/topic/136047-directory-transversal-php-upload/#findComment-709433 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.