Hei , jeg får ikke slettet mine filer med unlink , selv om jeg mener at jeg har satt alt rett i php koden.
Kode
session_start(); require_once('../functions.php'); connectToDatabase(); authenticateUser(); $action = $_GET['action']; $id = $_GET['id']; $lpage = $_GET['lpage']; if($action == del) { // delete $query = "DELETE FROM gallery_images WHERE bind_to_uid = $_SESSION[userid] AND id = $id"; $query2 = "DELETE FROM gallery_comments WHERE bind_to_uid = $_SESSION[userid] AND bind_to_photo = $id"; mysql_query($query); mysql_query($query2); unlink('/home/p247/public_html/img1/g/i/'.$filename);// delete file unlink('/home/p247/public_html/img1/g/t/'.$filename); header("location:../?page=myphotos&lpage=$lpage"); exit; }