Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,088 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
For a software project in which I participate the installation routine contains the following code (PHP):
unlink(getcwd() . '/index.php');
unlink(getcwd() . '/prestashop.zip');
rename(getcwd() . '/index.php.temp', getcwd() . '/index.php');
It results in an "access denied" error for the last line.
This is a Windows specific error. Somehow the file of the first line (that is also the executing code that contains this line) is not yet deleted when the third line is executed and as a result the third line is refused.
I would like to know how I can work around this problem.