First off the server is running Windows 7 32bits.
I have the following code:
<?php $fp = fopen(getcwd()."/test.txt", "w"); fwrite($fp, "hello"); chmod(getcwd()."/test.txt", 0777); unlink(getcwd()."/test.txt"); fclose($fp); ?>
It creates the file perfectly but afterwards I cannot delete it. Giving me this error:
Warning: unlink(C:\test.txt) [function.unlink]: Permission denied in C:\writeanddel.php on line 4
First off, I know chmod doesnt work in Windows but I added it anyways.
Second, Im sure that the folder test is written on (obviously not C:/) has complete write/read access for everyone.
Whats wrong and how can I do this correctly?