title: auto find file directory path using PHP
body: <p>I upload file in my server and I have this url from my databse:</p>
  
  <pre><code>                  |---&gt; subdomain for xammp in localhost windows
                    |
  http://localhost/cms/uploads/files/1/final.mp4
  </code></pre>
  
  <p>Now for download i need to show file directory path of file like:</p>
  
  <pre><code>../cms/uploads/files/1/final.mp4 // This worked for subdomain
  OR
  ./uploads/files/1/final.mp4 // This worked for domain root
  </code></pre>
  
  <p>how do auto find server path directory for file ?!</p>