If your user is daemon, then you need to ensure that the daemon user has appropriate permissions to access the directory /opt/lampp/htdocs/classes/php where you want to create files.
Here's how you can give daemon user write permission to the directory:
sudo chown -R daemon:daemon /opt/lampp/htdocs/classes/php
This command recursively changes the ownership of the directory and its contents to the daemon user and group. After changing ownership, you can then modify the permissions to allow write access:
sudo chmod -R u+w /opt/lampp/htdocs/classes/php
This command gives the owner (daemon user) write permission to the directory and its contents.
With these commands, the daemon user should be able to create files in the /opt/lampp/htdocs/classes/php
directory. Make sure to replace daemon with the appropriate user if it's different on your system.
and check