Php Code To Remve File From A Folder Using Php
________________________________________________________
I Use In This Tutorial:
- NetBeans IDE .
- XAMPP .
In this Php Tutorial we will see How To Delete File From A Folder Using Php .
I Use In This Tutorial:
- NetBeans IDE .
- XAMPP .
Php Source Code:
<?php
if(isset($_POST['remve_file']))
{
$file_Path = $_POST['fileToRemove'];
// check if the file exist
if(file_exists($file_Path))
{
unlink($file_Path);
echo 'File Deleted';
}else{
echo 'File Not Exist';
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>PHP DELETE FILE FROM FOLDER</title>
</head>
<body>
<form action="php_delete_file_from_folder.php" method="post">
File Path: <input type="text" name="fileToRemove"><br><br>
<input type="submit" name="remve_file" value="Delete File">
</form>
</body>
</html>
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :