title: check file in folder, if doesn't contain pdf it will skip the next process
body: <p>I wanna check folder, if it contain PDF it will go to other process, if doesn't contain PDF, it will skip the process.
  here's the code :</p>
  
  <pre><code>&lt;?php
  set_time_limit(0);
  $savePath  = 'D:/AppServ/www/aca/';
  
  $dir      = opendir($savePath);
  $check    = glob($savePath.'*.pdf');
  if($check === ''){ exit();} // if not found pdf don't do process below this
  
  // many other process below 
  ?&gt;
  </code></pre>
  
  <p>but the process still run, how to break it ? thank you :)</p>