php file upload problem

后端 未结 6 1300
野性不改
野性不改 2021-01-23 19:39

This code works properly in my localhost. I am using xampp 1.7.3. but when I put it in the live server it shows Possible file upload attack!. \'upload/\' is the fol

6条回答
  •  天命终不由人
    2021-01-23 20:25

    The problem is the leading slash in your file name. While it might resolve correctly on your XAMPP machine when it's on your server box the leading slash will try to put it in the filesystem root.

    It's guessing that it's an attack because people can sometimes fudge incoming parameters to drop harmful files where they can execute them!

提交回复
热议问题