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
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!