我想通过 php 从目录中删除文件。不知何故,我的 php_errorlog 总是告诉我:
[06-Jun-2010 19:38:46] PHP 警告:chmod() [function.chmod]:/Users/myname/htdocs/ 中不允许操作
if ($_POST) {
echo "yeah!!!";
print count($_POST['deletefiles']);
chmod($path, 0777); //server rights
foreach ($_POST['deletefiles'] as $value) {
print $value;
unlink($path .'/' . $value);
}
//chmod($path, 0666); //server rights
}
我究竟做错了什么?谢谢