[support] path problem

Victor Kane victorkane at gmail.com
Sat Aug 2 17:07:21 UTC 2008


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.

What is it you cannot get done?

On Sat, Aug 2, 2008 at 1:01 PM, John Horning <john at rivul.com> wrote:

>  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.
>
>
> John Horning wrote:
>
> I can't get anything other than "/" returned by base_path(), regardless of
> the level I'm on.  I must be missing something.
>
>
> Victor Kane wrote:
>
> As URL?
>
> Assuming it were ./files, then try sthg like <?php base_path() . 'files' ?>
>
> On Sat, Aug 2, 2008 at 9:15 AM, John Horning <john at rivul.com> wrote:
>
>>  Thanks.  Is there something like that to get me to the files directory?
>> John
>>
>> Victor Kane wrote:
>>
>>  Try the following:
>>
>> <?php base_path() . path_to_theme() ?>/box_bottom.png
>>
>> <img src="<?php print base_path() . path_to_theme() . "/pic/mary.png"; ?>"
>> />
>>
>> Victor Kane
>> http://awebfactory.com.ar
>>
>> On Fri, Aug 1, 2008 at 10:28 PM, John Horning <john at rivul.com> wrote:
>>
>>> 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?
>>>
>>> --
>>> [ Drupal support list | http://lists.drupal.org/ ]
>>>
>>
>>   No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com
>> Version: 8.0.138 / Virus Database: 270.5.10/1585 - Release Date: 8/1/2008 6:39 AM
>>
>>
>>
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>
>
>  No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.138 / Virus Database: 270.5.10/1586 - Release Date: 8/1/2008 6:59 PM
>
>
>  No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.138 / Virus Database: 270.5.10/1586 - Release Date: 8/1/2008 6:59 PM
>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080802/27538d14/attachment-0001.htm 


More information about the support mailing list