I have a file download script which chmods the file permissions to read/downloadable when used.
However I have tried to make it so that the same script will chmod the file permissions back to not readable again after the download is initiated, but it does not work.
The chmod works, it's just that I cant make the last chmod to wait until the download has initiated.
Sleep doesnt help because it seems as if that delays the whole script rather than the codes below the string.
Expand|Select|Wrap|Line Numbers
- chmod("$fDirr", 0777);
- echo "<meta http-equiv='Refresh' content='1;url=files/$filename'> ";
- chmod("$fDirr", 0600);