I have such a situation. I want to delete a WAV file from the webroot directory, but I defined an alias of this directory in httpd.conf (apache), for example, "mp3". it works beautifully, because I can download the file from the website, etc. But I want to delete it and which I can not do. I have a PHPscript like this =>
class Delete{
public function del_directory_record($filename){
if (unlink("/mp3/$filename")){
return true;
}
}
}
$new = new Delete();
$new->del_directory_record("file.wav");
In php-errors, this gives me " PHP Warning => There is no such file or directory ". I am wondering what am I doing wrong?
It still doesn't work ...
I have on C: \ server \ webroot ... and I have an mp3_files directory on C: \ server \ mp3_files In httpd.conf I wrote
Alias /mp3/ "C:/server/mp3_files/"
<Directory "C:/server/mp3_files/">
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>
source
share