Is your XAMPP server running PHP-CGI or PHP-FPM?
If PHP-CGI, then you need to make sure that XAMPP is running under a user that has written permissions on the folder.
If PHP-FPM, then you need to make sure that the PHP-FPM service is running under a user that has written permissions on the folder.
Now since XAMPP on Windows is only meant to be used for development and testing, you can always just set the folder's permissions to allow everyone full access. That is, only if you use it in such manner. Otherwise you need to find a webserver more suitable for a production server.