setting base path for sub-directories script in php
<p>I may know that this question leads to a no-answer-topic  but who knows ! :D</p>

<p>concider we have a php script that should be used in root path </p>

<p>like this : </p>

<pre><code>root/
</code></pre>

<p>but when we move it to a sub folder its like this :</p>

<pre><code>root/script/gallery
</code></pre>

<p>in its codes,its noted that </p>

<pre><code>images/add.png
</code></pre>

<p>and it should be </p>

<pre><code>scripts/gallery/images/add.png
</code></pre>

<p>ok one way is setting base path in  section </p>

<pre><code>&lt;base href="http://localhost/scripts/gallery/" /&gt; 
</code></pre>

<p>but setting this base path makes other scripts located in root directory to be failed .</p>

<p>easy solution and laboring way is to change all paths in the scripts .</p>
