require_once Inside require_once Creates Path Issue
<p>I have this condition :</p>

<ul>
<li>a file : <code>/public_html/folderX/test.php</code> has a line : <code>require_once '../functions/sendemail.php'</code></li>
<li>on the other hand, <code>/public_html/functions/sendemail.php</code> has a line : <code>require_once '../config.php'</code></li>
</ul>

<p><code>config.php</code> loads perfectly in this situation.</p>

<p>the problem occurs when I try to add that <code>functions/sendemail.php</code> on file(s) which not in the folderX, for example :</p>

<p>when I tried to add <code>require_once 'functions/sendemail.php'</code> on <code>public_html/test.php</code> I got this error message : </p>

<blockquote>
  <p>Warning: require_once(../config-min.php) [function.require-once]: failed to open stream: No such file or directory in public_html/test.php</p>
</blockquote>

<p>how to make <code>require_once '../config.php'</code> inside functions/sendemail.php works 'independently' so wherever it's included on any files this 'require_once' problem won't occur anymore.</p>

<p>I tried to change into 'include_once' but still doesn't work.</p>

<p>thanks!</p>
