pietbez Posted January 20, 2009 Share Posted January 20, 2009 how can i change the name of the uploaded file by adding a variable to the name. for example. picture.jpg becomes 1_ picture.jpg <?php move_uploaded_file($_FILES['Filedata']['tmp_name'], "./links/".$_FILES['Filedata']['name']); chmod("./links/".$_FILES['Filedata']['name'], 0777); ?> Link to comment https://forums.phpfreaks.com/topic/141607-solved-image-upload/ Share on other sites More sharing options...
cytech Posted January 20, 2009 Share Posted January 20, 2009 $new_filename = "1_".$_FILES['Filedata']['name']; move_uploaded_file($_FILES['Filedata']['tmp_name'], "./links/".$new_filename); chmod("./links/".$new_filename, 0777); Link to comment https://forums.phpfreaks.com/topic/141607-solved-image-upload/#findComment-741194 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.