Re: PHP unlink Errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you have php_safe_mode enabled? If's that's the case, try turning it off and then run your script again.
Alice Wei wrote:
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
--
http://bithub.net/
Synchronize, share and backup your files over the web for free

http://twitter.com/MarcSteinert
My Twitter feed
**

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux