title: How can check a php file is successfully included?
body: <p><br />
  I want to check if 'dbas.php' is included in 'ad.php'. I wrote the code - <br /></p>
  
  <p><em><strong>ad.php</em></strong></p>
  
  <pre><code>&lt;?php if(file_exists("dbas.php") &amp;&amp; include("dbas.php")){
  // some code will be here
  }
  else{echo"Database loading failed";}
  ?&gt;
  </code></pre>
  
  <p>I successfully tested the file_exists() part but don't know if the include() will work well or not, cause I tried in localhost and if the file is in directory then it never fails to include. So I don't know how this code would behave in the server if much traffic  be there. So please tell me is my code correct ?</p>
  
  <p>-Thanks.</p>
  
  <p><em><strong>Solved:</em></strong> Thank you so much for your answers.</p>