PHP image upload security approach

后端 未结 3 849
孤街浪徒
孤街浪徒 2020-12-31 08:55

I develop a php script to replace a current one, that will have a lot of exposure to various markets/countries. This script between others offers an photo upload functionali

3条回答
  •  耶瑟儿~
    2020-12-31 09:29

    You should also check uploaded file size, as getimagesize can sometimes exceed available RAM memory. It's also good to assume that your script can crash at any point (for example when the electricity go down), so you should implement some clean up procedures to remove left, unneeded files.

提交回复
热议问题