我想用 webroot 之外的 php(取消链接功能)文件删除。我的网络根在
C:\server\webroot\project\... in webroot I have folder named project and in there I have .php files.
什么是文件目录。它位于 C:\server\mp3_files...
我还在 mp3_files 目录的 httpd.conf Alias("mp3") 中创建了
我在 C:\server\webroot\project\test.php 中编写这个脚本
脚本是这样的=>
function delete($filename){
if (unlink("/mp3/" . $filename)){
echo "Deleted";
} else {
echo "No";
}
}
delete("file.txt");
这个脚本给了我 php-errors => PHP-WARNING No such file or directory
我也有(test.php)html表单这个=>
<a href="/mp3/file.txt">Download</a>
这有效(它打开这个file.txt)
所以我想知道为什么不能用标记函数“delete($filename)”删除?