{"id":763,"date":"2017-09-23T23:00:47","date_gmt":"2017-09-23T16:00:47","guid":{"rendered":"http:\/\/www.yellowweb.id\/blog\/?p=763"},"modified":"2017-09-23T23:00:58","modified_gmt":"2017-09-23T16:00:58","slug":"unlink-php","status":"publish","type":"post","link":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/","title":{"rendered":"Unlink PHP"},"content":{"rendered":"<p>Tutorial kali ini kita akan mencoba menghapus file dengan dengan menggunakan unlink. Seperti saat teman-teman mengupload data kedalam database kemudian menyimpan file kedalam folder. Lantas bagaimana caranya menghapus file yang terdapat di dalam folder tersebut?<br \/>\n<!--more--><\/p>\n<p>Solusinya dengan menggunakan unlink.<\/p>\n<p>Coba tutorial berikut ini:<br \/>\n1. index.php<br \/>\n2. koneksi.php<br \/>\n3. tampil.php<br \/>\n4. proses-upload.php<br \/>\n5. hapus.php<br \/>\n6. edit.php<br \/>\n7. proses-edit.php<br \/>\n8. Buat folder dengan nama hasil-upload, untuk menampung hasil upload<\/p>\n<p>index.php<\/p>\n<pre class=\"lang:default decode:true \" >&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;Tambah Data&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\t\r\n\t&lt;form action=\"proses-upload.php\" method=\"POST\" enctype=\"multipart\/form-data\"&gt;\r\n\t\t&lt;input type=\"file\" name=\"fileku\"&gt;\r\n\t\t&lt;input class=\"btn btn-primary\" type=\"submit\" name=\"submit\" value=\"Upload\"&gt;\r\n\t&lt;\/form&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>koneksi.php<\/p>\n<pre class=\"lang:default decode:true \" >&lt;?php\r\n\t$server = \"localhost\";\r\n\t$user = \"root\";\r\n\t$pass = \"\";\r\n\t$database = \"delete_img\";\r\n\r\n\t$kon = mysql_connect($server, $user, $pass) or die (mysql_error());\r\n\t$db = mysql_select_db($database, $kon) or die (mysql_error());\r\n\r\n\r\n?&gt;<\/pre>\n<p>tampil.php<\/p>\n<pre class=\"lang:default decode:true \" >&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;Tampil Data&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\t&lt;table border=\"1\"&gt;\r\n\t\t&lt;thead&gt;\r\n\t\t\t&lt;tr&gt;\r\n\t\t\t\t&lt;th&gt;No&lt;\/th&gt;\r\n\t\t\t\t&lt;th&gt;Image&lt;\/th&gt;\r\n\t\t\t\t&lt;th colspan=\"2\"&gt;Aksi&lt;\/th&gt;\r\n\t\t\t&lt;\/tr&gt;\r\n\t\t&lt;\/thead&gt;\r\n\t\t&lt;tbody&gt;\r\n\t\t\t&lt;?php\r\n\t\t\t\tinclude \"koneksi.php\";\r\n\t\t\t\t$sql = \"SELECT * FROM tbl_produk\";\r\n\t\t\t\t$query = mysql_query($sql) or die (mysql_error());\r\n\r\n\t\t\t\t$no = 1;\r\n\r\n\t\t\t\twhile($data = mysql_fetch_array($query)){\r\n\t\t\t\t\t$id = $data[\"id_file\"];\r\n\t\t\t\t\t$nm = $data[\"name_file\"];\r\n\r\n\t\t\t\t\techo \"&lt;tr&gt;\r\n\t\t\t\t\t\t\t&lt;td&gt;$no&lt;\/td&gt;\r\n\t\t\t\t\t\t\t&lt;td&gt;&lt;img class='img img-responsive' src='hasil-upload\/$nm' height='70' width='100'&gt;&lt;\/td&gt;\r\n\t\t\t\t\t\t\t&lt;td&gt;&lt;a href='hapus.php?id=$id'&gt;Hapus&lt;\/a&gt;&lt;\/td&gt;\r\n\t\t\t\t\t\t\t&lt;td&gt;&lt;a href='edit.php?id=$id'&gt;Edit&lt;\/a&gt;&lt;\/td&gt;\r\n\t\t\t\t\t\t&lt;\/tr&gt;\";\r\n\t\t\t\t\t\t$no++;\r\n\t\t\t\t}\r\n\t\t\t?&gt;\r\n\t\t\t\r\n\t\t&lt;\/tbody&gt;\r\n\t&lt;\/table&gt;\r\n\t\t\t\t\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>proses-upload.php<\/p>\n<pre class=\"lang:default decode:true \" >&lt;?php\r\n\tinclude \"koneksi.php\";\r\n\r\n\t$nm_file = $_FILES[\"fileku\"][\"name\"];\r\n\t$tmp_file = $_FILES[\"fileku\"][\"tmp_name\"];\r\n\t$sz_file = $_FILES[\"fileku\"][\"size\"];\r\n\t$tp_file = $_FILES[\"fileku\"][\"type\"];\r\n\r\n\t$dir = \"hasil-upload\/$nm_file\";\r\n\tmove_uploaded_file($tmp_file, $dir);\r\n\r\n\t$sql = \"INSERT INTO tbl_produk (name_file) VALUES ('$nm_file')\";\r\n\t$query = mysql_query($sql) or die (mysql_error());\r\n\r\n\theader(\"location: tampil.php\");\r\n\r\n?&gt;<\/pre>\n<p>hapus.php<\/p>\n<pre class=\"lang:default decode:true \" >&lt;?php\r\n\tinclude \"koneksi.php\";\r\n\r\n\t\/\/ tangkap parameter di url dengan $_GET\t\r\n\t$id = $_GET[\"id\"];\r\n\r\n\t\/\/ pilih data yang akan dihapus berdasarkan id\r\n\t$sql1 = \"SELECT * FROM tbl_produk WHERE id_file='$id'\";\r\n\t$query1 = mysql_query($sql1) or die (mysql_error());\r\n\t$data = mysql_fetch_array($query1);\r\n\r\n\t\/\/ lakukan eksekusi hapus data dengan menggunakan query sql DELETE\r\n\t$sql2 = \"DELETE FROM tbl_produk WHERE id_file='$id'\";\r\n\t$query2 = mysql_query($sql2) or die (mysql_error());\r\n\r\n\t\/\/ tentukan direktori penyimpanan file yang akan dihapus\r\n\t$path = \"hasil-upload\/\".$data[\"name_file\"];\r\n\r\n\t\/\/ cek jika ada file\r\n\tif(file_exists($path)){\r\n\r\n\t\t\/\/ gunakan fungsi php unlink\r\n\t\tunlink($path);\r\n\t}\r\n\r\n\r\n\theader(\"location: tampil.php\");\r\n\r\n?&gt;<\/pre>\n<p>edit.php<\/p>\n<pre class=\"lang:default decode:true \" >&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;Tambah Data&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\t\r\n\t&lt;?php\r\n\t\tinclude \"koneksi.php\";\r\n\r\n\t\t$id = $_GET[\"id\"];\r\n\r\n\t\t$sql = \"SELECT * FROM tbl_produk WHERE id_file='$id'\";\r\n\t\t$query = mysql_query($sql) or die (mysql_error());\r\n\t\twhile($data = mysql_fetch_array($query)){?&gt;\r\n\t\t\t&lt;form action=\"proses-edit.php\" method=\"POST\" enctype=\"multipart\/form-data\"&gt;\r\n\t\t\t\t&lt;input type=\"hidden\" name=\"id\" value=\"&lt;?php echo $data[\"id_file\"];?&gt;\"&gt;\r\n\t\t\t\t&lt;img src=\"hasil-upload\/&lt;?php echo $data[\"name_file\"];?&gt;\" height=\"70\" width=\"100\"&gt;\r\n\t\t\t\t&lt;br&gt;\r\n\t\t\t\t&lt;input type=\"file\" name=\"fileku\"&gt;\r\n\t\t\t\t&lt;input class=\"btn btn-primary\" type=\"submit\" name=\"submit\" value=\"Upload\"&gt;\r\n\t\t\t&lt;\/form&gt;\r\n\t\t&lt;?php }\r\n\t?&gt;\r\n\t\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>proses-edit.php<\/p>\n<pre class=\"lang:default decode:true \" >&lt;?php\r\n\tinclude \"koneksi.php\";\r\n\r\n\t$nm_file = $_FILES[\"fileku\"][\"name\"];\r\n\t$tmp_file = $_FILES[\"fileku\"][\"tmp_name\"];\r\n\t$sz_file = $_FILES[\"fileku\"][\"size\"];\r\n\t$tp_file = $_FILES[\"fileku\"][\"type\"];\r\n\r\n\t$id = $_POST[\"id\"];\r\n\r\n\t$dir = \"hasil-upload\/$nm_file\";\r\n\tmove_uploaded_file($tmp_file, $dir);\r\n\r\n\t\/\/ pilih data yang akan dihapus berdasarkan id\r\n\t$sql1 = \"SELECT * FROM tbl_produk WHERE id_file='$id'\";\r\n\t$query1 = mysql_query($sql1) or die (mysql_error());\r\n\t$data = mysql_fetch_array($query1);\r\n\r\n\t\/\/ lakukan update data dengan menggunakan query sql UPDATE\r\n\t$sql2 = \"UPDATE tbl_produk SET name_file='$nm_file' WHERE id_file='$id'\";\r\n\t$query2 = mysql_query($sql2) or die (mysql_error());\r\n\r\n\t\/\/ tentukan direktori penyimpanan file yang akan dihapus\r\n\t$path = \"hasil-upload\/\".$data[\"name_file\"];\r\n\r\n\t\/\/ cek jika ada file\r\n\tif(file_exists($path)){\r\n\r\n\t\t\/\/ gunakan fungsi php unlink\r\n\t\tunlink($path);\r\n\t}\r\n\r\n\r\n\theader(\"location: tampil.php\");\r\n\r\n?&gt;<\/pre>\n<p>Databasenya<\/p>\n<pre class=\"lang:default decode:true \" >-- phpMyAdmin SQL Dump\r\n-- version 4.5.1\r\n-- http:\/\/www.phpmyadmin.net\r\n--\r\n-- Host: 127.0.0.1\r\n-- Generation Time: Sep 23, 2017 at 05:55 PM\r\n-- Server version: 10.1.13-MariaDB\r\n-- PHP Version: 5.6.23\r\n\r\nSET SQL_MODE = \"NO_AUTO_VALUE_ON_ZERO\";\r\nSET time_zone = \"+00:00\";\r\n\r\n\r\n\/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *\/;\r\n\/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *\/;\r\n\/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION *\/;\r\n\/*!40101 SET NAMES utf8mb4 *\/;\r\n\r\n--\r\n-- Database: `delete_img`\r\n--\r\n\r\n-- --------------------------------------------------------\r\n\r\n--\r\n-- Table structure for table `tbl_produk`\r\n--\r\n\r\nCREATE TABLE `tbl_produk` (\r\n  `id_file` int(5) NOT NULL,\r\n  `name_file` varchar(100) NOT NULL\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\r\n\r\n--\r\n-- Dumping data for table `tbl_produk`\r\n--\r\n\r\nINSERT INTO `tbl_produk` (`id_file`, `name_file`) VALUES\r\n(44, '0000451726.jpg');\r\n\r\n--\r\n-- Indexes for dumped tables\r\n--\r\n\r\n--\r\n-- Indexes for table `tbl_produk`\r\n--\r\nALTER TABLE `tbl_produk`\r\n  ADD PRIMARY KEY (`id_file`);\r\n\r\n--\r\n-- AUTO_INCREMENT for dumped tables\r\n--\r\n\r\n--\r\n-- AUTO_INCREMENT for table `tbl_produk`\r\n--\r\nALTER TABLE `tbl_produk`\r\n  MODIFY `id_file` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;\r\n\/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT *\/;\r\n\/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS *\/;\r\n\/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION *\/;\r\n<\/pre>\n<p>Teman-teman bisa langsung mencobanya, disini kita lakukan upload terlebih dahulu, kemudian kita lanjutkan dengan mencoba menghapus data yang sudah tersimpan.<\/p>\n<p>Ketika berhasil kalian akan melihat tidak hanya recordnya saja yang terhapus, namun file yand di dalam folder juga akan ikut terhapus ini karena kita menggunakan perintah unlink.<\/p>\n<p>Semoga artikel yang sederhana ini bisa memberi jawaban bagi teman-teman programming, dan tentunya kalian bisa mengembangkan lebih lanjut. Sampai berjumpa diartikel berikutnya.<\/p>\n<p>Jika ada pertanyaan, teman-teman bisa mengirimkan pesan melalui email di<br \/>\ninfo@yellowweb.id<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tutorial kali ini kita akan mencoba menghapus file dengan dengan menggunakan unlink. Seperti saat teman-teman mengupload data kedalam database kemudian menyimpan file kedalam folder. Lantas bagaimana caranya menghapus file yang terdapat di dalam folder tersebut?<\/p>\n","protected":false},"author":1,"featured_media":766,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110,11,1],"tags":[192,173,268,88,371,267],"class_list":["post-763","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","category-tutorial","category-uncategorised","tag-database","tag-delete","tag-image","tag-php","tag-unlink","tag-upload"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Unlink PHP - YELLOWWEB.ID<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.yellowweb.id\/blog\/unlink-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unlink PHP - YELLOWWEB.ID\" \/>\n<meta property=\"og:description\" content=\"Tutorial kali ini kita akan mencoba menghapus file dengan dengan menggunakan unlink. Seperti saat teman-teman mengupload data kedalam database kemudian menyimpan file kedalam folder. Lantas bagaimana caranya menghapus file yang terdapat di dalam folder tersebut?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.yellowweb.id\/blog\/unlink-php\/\" \/>\n<meta property=\"og:site_name\" content=\"YELLOWWEB.ID\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-23T16:00:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-09-23T16:00:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.yellowweb.id\/blog\/wp-content\/uploads\/2017\/09\/unlink.jpg?fit=600%2C290&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"290\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"yellowweb\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yellowweb\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/\"},\"author\":{\"name\":\"yellowweb\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#\\\/schema\\\/person\\\/75188044e080844724e381ab6a5b9829\"},\"headline\":\"Unlink PHP\",\"datePublished\":\"2017-09-23T16:00:47+00:00\",\"dateModified\":\"2017-09-23T16:00:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/\"},\"wordCount\":165,\"image\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/unlink.jpg\",\"keywords\":[\"database\",\"delete\",\"image\",\"php\",\"unlink\",\"upload\"],\"articleSection\":[\"PHP\",\"Tutorial\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/\",\"url\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/\",\"name\":\"Unlink PHP - YELLOWWEB.ID\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/unlink.jpg\",\"datePublished\":\"2017-09-23T16:00:47+00:00\",\"dateModified\":\"2017-09-23T16:00:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#\\\/schema\\\/person\\\/75188044e080844724e381ab6a5b9829\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/unlink.jpg\",\"contentUrl\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/unlink.jpg\",\"width\":600,\"height\":290,\"caption\":\"unlink.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/unlink-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unlink PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/\",\"name\":\"YELLOWWEB.ID\",\"description\":\"Kursus Web Design | Kursus Web Programming | Mobile Web Apps | Digital Marketing\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#\\\/schema\\\/person\\\/75188044e080844724e381ab6a5b9829\",\"name\":\"yellowweb\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g\",\"caption\":\"yellowweb\"},\"sameAs\":[\"https:\\\/\\\/www.yellowweb.id\"],\"url\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/author\\\/yellowweb\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unlink PHP - YELLOWWEB.ID","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/","og_locale":"en_GB","og_type":"article","og_title":"Unlink PHP - YELLOWWEB.ID","og_description":"Tutorial kali ini kita akan mencoba menghapus file dengan dengan menggunakan unlink. Seperti saat teman-teman mengupload data kedalam database kemudian menyimpan file kedalam folder. Lantas bagaimana caranya menghapus file yang terdapat di dalam folder tersebut?","og_url":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/","og_site_name":"YELLOWWEB.ID","article_published_time":"2017-09-23T16:00:47+00:00","article_modified_time":"2017-09-23T16:00:58+00:00","og_image":[{"width":600,"height":290,"url":"https:\/\/i0.wp.com\/www.yellowweb.id\/blog\/wp-content\/uploads\/2017\/09\/unlink.jpg?fit=600%2C290&ssl=1","type":"image\/jpeg"}],"author":"yellowweb","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yellowweb","Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/#article","isPartOf":{"@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/"},"author":{"name":"yellowweb","@id":"https:\/\/www.yellowweb.id\/blog\/#\/schema\/person\/75188044e080844724e381ab6a5b9829"},"headline":"Unlink PHP","datePublished":"2017-09-23T16:00:47+00:00","dateModified":"2017-09-23T16:00:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/"},"wordCount":165,"image":{"@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2017\/09\/unlink.jpg","keywords":["database","delete","image","php","unlink","upload"],"articleSection":["PHP","Tutorial"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/","url":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/","name":"Unlink PHP - YELLOWWEB.ID","isPartOf":{"@id":"https:\/\/www.yellowweb.id\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/#primaryimage"},"image":{"@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2017\/09\/unlink.jpg","datePublished":"2017-09-23T16:00:47+00:00","dateModified":"2017-09-23T16:00:58+00:00","author":{"@id":"https:\/\/www.yellowweb.id\/blog\/#\/schema\/person\/75188044e080844724e381ab6a5b9829"},"breadcrumb":{"@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.yellowweb.id\/blog\/unlink-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/#primaryimage","url":"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2017\/09\/unlink.jpg","contentUrl":"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2017\/09\/unlink.jpg","width":600,"height":290,"caption":"unlink.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.yellowweb.id\/blog\/unlink-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.yellowweb.id\/blog\/"},{"@type":"ListItem","position":2,"name":"Unlink PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.yellowweb.id\/blog\/#website","url":"https:\/\/www.yellowweb.id\/blog\/","name":"YELLOWWEB.ID","description":"Kursus Web Design | Kursus Web Programming | Mobile Web Apps | Digital Marketing","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.yellowweb.id\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.yellowweb.id\/blog\/#\/schema\/person\/75188044e080844724e381ab6a5b9829","name":"yellowweb","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g","caption":"yellowweb"},"sameAs":["https:\/\/www.yellowweb.id"],"url":"https:\/\/www.yellowweb.id\/blog\/author\/yellowweb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/posts\/763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/comments?post=763"}],"version-history":[{"count":3,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/posts\/763\/revisions"}],"predecessor-version":[{"id":767,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/posts\/763\/revisions\/767"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/media\/766"}],"wp:attachment":[{"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/media?parent=763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/categories?post=763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/tags?post=763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}