Saturday, 20 February 2016

PHP function unlink tutorial

PHP unlink fumction is such a nice one, independent, with this line of code you can overcome the long time year bordering and easying out time you spend online for manual opertions, PHP IS GREAT, you can develop any application of your choise i bet you with PHP as you fundamental programming language,

Learn how to delete large file automatically from server, PDF, IMAGES, VIDEOS, ANY FILE, with this function you are completely in control of your application, try a little kindness...

Have a look at the unlink documentation

How to use php function unlink to remove image from server? if that is your question here it end aahhh...

  1. include 'config.php'; ?>
  2. if(isset($_GET['id']))
  3. {
  4.     $del=$_GET['id'];
  5.     $res=$db->query("SELECT img FROM unlink WHERE id='$del'");
  6.     $row=mysqli_fetch_array($res);
  8.     $query=$db->query("DELETE FROM unlink WHERE id='$del'");
  9.     unlink("upload/".$row['img']);
  10.     header ('location: index.php?deleted');    
  11. }
  12. ?>

No comments:

Post a Comment

Hit me with a comment!