<div dir="ltr">Well, assuming you are talking about URLs, you should be all set. All Drupal modules see the world from the Drupal document root, so <?php base_path() .
'files' ?> should be fine for a URL.<br><br>What is it you cannot get done?<br><br><div class="gmail_quote">On Sat, Aug 2, 2008 at 1:01 PM, John Horning <span dir="ltr"><<a href="mailto:john@rivul.com">john@rivul.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#333333">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Do you know
anything about file_directory_path()? It returns "files", which is
correct for use from the home directory, but not useful on other levels.<br>
<br>
</font></font><div><div></div><div class="Wj3C7c"><br>
John Horning wrote:
<blockquote type="cite">
<font size="-1"><font face="Helvetica, Arial, sans-serif">I can't get
anything other than "/" returned by base_path(), regardless of the
level I'm on. I must be missing something.<br>
<br>
</font></font><br>
Victor Kane wrote:
<blockquote type="cite">
<div dir="ltr">As URL?<br>
<br>
Assuming it were ./files, then try sthg like <?php base_path() .
'files' ?><br>
<br>
<div class="gmail_quote">On Sat, Aug 2, 2008 at 9:15 AM, John
Horning <span dir="ltr"><<a href="mailto:john@rivul.com" target="_blank">john@rivul.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#333333"> <font size="-1"><font face="Helvetica, Arial, sans-serif">Thanks.
Is
there something like that to get me to the files directory?<br>
John<br>
</font></font><br>
Victor Kane wrote:
<blockquote type="cite">
<div>
<div>
<div dir="ltr"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">Try the following:<br>
<br>
<?php base_path</span><span style="color: rgb(0, 119, 0);">() . </span><span style="color: rgb(0, 0, 187);">path_to_theme</span><span style="color: rgb(0, 119, 0);">() </span><span style="color: rgb(0, 0, 187);">?></span></span>/box_bottom.png<br>
<br>
</code><code><img src="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">base_path</span><span style="color: rgb(0, 119, 0);">() . </span><span style="color: rgb(0, 0, 187);">path_to_theme</span><span style="color: rgb(0, 119, 0);">() . </span><span style="color: rgb(221, 0, 0);">"/pic/mary.png"</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span></span>" /></code><br>
<br>
Victor Kane<br>
<a href="http://awebfactory.com.ar" target="_blank">http://awebfactory.com.ar</a><br>
<br>
<div class="gmail_quote">On Fri, Aug 1, 2008 at 10:28 PM, John
Horning <span dir="ltr"><<a href="mailto:john@rivul.com" target="_blank">john@rivul.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#333333">Apparently Drupal does
not allow you to reference absolute URL paths in
scripts, which is causing me a problem. I have a script in my
page.tpl.php that randomly picks images from a directory and displays
them in the header. This works when you're on the top level, but not
below since I'm using a relative path to get to the image directory.
Can anyone tell me the proper way of doing this?<br>
</div>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a>
]<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<pre>No virus found in this incoming message.
Checked by AVG - <a href="http://www.avg.com" target="_blank">http://www.avg.com</a>
Version: 8.0.138 / Virus Database: 270.5.10/1585 - Release Date: 8/1/2008 6:39 AM
</pre>
</blockquote>
</div>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a>
]<br>
</blockquote>
</div>
<br>
</div>
<pre>No virus found in this incoming message.
Checked by AVG - <a href="http://www.avg.com" target="_blank">http://www.avg.com</a>
Version: 8.0.138 / Virus Database: 270.5.10/1586 - Release Date: 8/1/2008 6:59 PM
</pre>
</blockquote>
<pre>No virus found in this incoming message.
Checked by AVG - <a href="http://www.avg.com" target="_blank">http://www.avg.com</a>
Version: 8.0.138 / Virus Database: 270.5.10/1586 - Release Date: 8/1/2008 6:59 PM
</pre>
</blockquote>
</div></div></div>
<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br></div>