How to rename file?

Hello. How to rename the file setup.exe that lies at the root of the website. Need to the link:
site.ru/file.php?q=777
He swung like 777.exe
July 2nd 19 at 13:09
1 answer
July 2nd 19 at 13:11
It's not preimenovanje file and return the file through the script.

For example, so.

Find more questions by tags PHP