<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 19:25:00 +0000</lastBuildDate>
    <item>
      <title>(PHP) Get Relative Path to Root Directory - blackhole12</title>
      <link>https://snipplr.com/view/16527/get-relative-path-to-root-directory</link>
      <description>&lt;p&gt;There's another snippet on here that always comes up on google for finding the relative path to the root, but it doesn't work very well. This version will work from the root, from any subdirectory, and with malformed path names such as www.example.com/////dir////path///file.php&#13;
&#13;
What I have here is designed to be pasted at the top of a php file, but you can also stick it inside a function and return $relpath.&lt;/p&gt;</description>
      <pubDate>Tue, 30 Jun 2009 15:55:43 UTC</pubDate>
      <guid>https://snipplr.com/view/16527/get-relative-path-to-root-directory</guid>
    </item>
  </channel>
</rss>
