Why can't I unlink the tar file that I created via PharData?
try
{
$a = new PharData('archive.tar');
// ADD FILES TO archive.tar FILE
$a->addFile('manifest.json');
}
catch (Exception $e)
{
echo "Exception : " . $e;
}
//Now compress to tar.gz
file_put_contents('archive.tgz' , gzencode(file_get_contents('archive.tar')));
chmod('archive.tar', 0777);
unlink('archive.tar');
Error,
Warning: unlink(archive.tar): Permission denied in C:...
I have forced the tar file to 777 but it still does not work.
Any ideas?