File upload Safety??

Hello I am an amateur PHP Programmer

I have a page that allows for users to upload files to my server and share a link so others can download these files

[php]move_uploaded_file($_FILES[“file”][“tmp_name”],
“m/” . $newname);[/php]

the files are stored in directory names “m”

I want to allow all types of files including EXE files… is there a way to may sure that no files in the folder “m” can be executed on my server? but still allow them to be downloaded by anyone.

I’m using Linux apache

Thanks for any help or feedback on how to safely allow any FILE TYPE to be uploaded and downloaded

Paul

Yep, create an array with invalid extensions, the compare those against what is in [‘type’]

Sponsor our Newsletter | Privacy Policy | Terms of Service