How can I determine a file's true extension/type programmatically?

前端 未结 11 1307
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-01 17:06

I am working on a script that will process user uploads to the server, and as an added layer of security I\'d like to know:

Is there a way to detect a file\'s true e

11条回答
  •  离开以前
    2020-12-01 17:45

    that could still be forged. I would ensure that you can not (or do not) run a file uploaded to the server automatically.

    I would also have a virus/spy ware scanner, and let it do the work for you.

提交回复
热议问题