Hi, 
 
  I have a snippet below that I would like to delete a file. However, I keep 
getting kicked out because of permission errors, when my folder permission is 
0777. 
 
<?php
 
ini_set('display_errors', 1); error_reporting(E_ALL);
$curDir = getcwd();
chmod($curDir,0777) or die ("Failed to change permission");
echo substr(sprintf('%o', fileperms($curDir)), -4); 
unlink("C:/Inetpub\wwwroot/project/testFile.txt");
echo unlink("C:/Inetpub/wwwroot/pproject/testFile.txt");  
 
?> 
 
Is it possible that someone on the list could point out what my possible errors 
are to allow this code to be functioning? 
 
Here is the output:
 
0777Warning: unlink(C:/Inetpub\wwwroot/project/testFile.txt) [function.unlink]: 
Permission denied in C:\Inetpub\wwwroot\project\file_write.php on line 
9Warning: unlink(C:/Inetpub/wwwroot/project/testFile.txt) [function.unlink]: 
Permission denied in C:\Inetpub\wwwroot\project\file_write.php on line 10
 
Thanks in advance. 
 
Alice
_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial!
http://www.windowsonecare.com/purchase/trial.aspx?sc_cid=wl_wlmail

Reply via email to