title: how to create an echo when there is a header location
body: <p>I want to display an echo when a file is deleted. For deleting files in a folder i use this loop:</p>
  
  <pre><code>if (isset($_GET['delete'])) {
      // if is directory -&gt; remove dir
      if(is_dir($_GET['delete'])){
          removeDirectory($_GET['delete']);
      }
      // else (must be a file) -&gt; unlink file
      else {
          unlink($_GET['delete']);
      }
  
      echo 'file successful deleted!'; // this echo is lost...
      // back to dir
      $dir = dirname(($_GET['delete']));
      header ("Location: ".'?dir='.$dir);
      die();
  }
  </code></pre>
  
  <p>Because of the header location, the echo will not be displayed. Thats a pitty. Is there a way i still can show an echo, even when there is a header location after it? </p>