Best way to write a reusable module with URLs?
<p>I am writing a reusable module in PHP.  This module can write content to an arbitrary page, but it needs URLs that reference scripts within this module.  Right now, I use a hard-coded variable that points to the root of the module:</p>

<pre><code>$module_root = "http://www.example.com/my_module/";
</code></pre>

<p>Is there a way to determine the root URL of my module dynamically?</p>
