[On-Rev] traversing file path in on-rev
Devin Asay
devin_asay at byu.edu
Wed Jun 3 19:03:14 EDT 2009
On Jun 3, 2009, at 4:59 PM, Alex Tweedly wrote:
> Devin Asay wrote:
>> I want to be able to use common libraries for all subdomains in my
>> domain. Right now all of my subdomains point to folders within my
>> public html root directory.
>>
>> /
>> includes/
>> mylib.irev
>> mysubdomain/
>> index.irev
>> index.irev
>>
>> I want to access mylib.irev from mysubdomain/index.irev. I would
>> think I should be able to do
>>
>> include "../includes/mylib.irev"
>>
> That does work for me. (to be precise, using include
> "../subfolder/xxx.irev"
> (I didn't have a folder called 'includes', but had one imaginatively
> called 'subfolder' :-)
How odd. I'm pretty sure that I had everything right--I even had the
path printed to the web page to make sure. What finally worked for me
was setting the defaultFolder to the includes folder then doing the
'include' call as a relative file path.
include "includes/mylib.irev"
>
> (Sadly, I can't get the equivalent to work for an add-on domain at the
> root level, but that's not too surprising).
>> But that doesn't work, and produces an error message saying
>>
>> FTP error: File "/mysubdomain/../includes/mylib.irev" not present
>> on server. Cannot download.
>>
> Why would you get an FTP error ? Are you sure this was while
> running
> index.irev ?
> Or is there some other part of your workflow that is doing ftp of
> these
> files ?
>
> Is the error message from the on-rev client debugger ? If not -
> give it
> a try and see what it says.
Right, I should have been more specific: it was from the debugger.
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list