Hey i'm trying to make my website delete a file using the unlink(); function. but when i try it comes up with this:
Warning: unlink() [function.unlink]: cURL does not allow unlinking in /home/nzcraftn/public_html/filenz/user/delete.php on line 18
Warning: Cannot modify header information - headers already sent by (output started at /home/nzcraftn/public_html/filenz/user/delete.php:18) in /home/nzcraftn/public_html/filenz/user/delete.php on line 27
I am using this code:
if($_SESSION['user'] == $who) {
$delete = unlink("http://www.filenz.nzcraft.net/$dl");
if($delete) {
$_SESSION['message'] = "<div style='color: #00FF00'>File deleted!</div>";
header("Location: index.php");
mysql_query("DELETE FROM fileinfos WHERE(`id`='$id')") or die(mysql_error());
} else {
$_SESSION['message'] = "<div style='color: #FF0000'>Error while deleting!</div>";
header("Location: index.php");
}
}
IF you could tell me if different way to delete files or help me fix my current problem i would appreicate it very much.
Thanks.