including a file on on-rev

Claudi Cornaz claudi.c at fiberworld.nl
Tue Nov 3 10:06:10 EST 2009


Hi all,

I finaly started getting to grips with on-rev and after some initial  
struggeling I start getting the hang of it.
Very powerfull and very nice.

However I am now again struggeling with a "simple" thing but I can't  
get it to work.
I have a folder "lib" with obviously some irev files  in it.

this lib folder is at the root level in my public_html folder

I need to include one of the files in this lib folder called  
"cc_PageStats" from other pages.
As long as the calling page is on the root level I can include the  
file with: include "lib/cc_PageStats.irev"
In that case everything works as expected.

Now I have a page in another folder, called testing. This folder is on  
the root level,
so I assumed I need to change the include statement to:
include "../lib/cc_PageStats.irev"
but this doesn't work. I get the error message in my on-Rev desktop  
app saying:
"FTP error file "/testing/..//lib/cc_PageStats.irev" not present.
(where does this 'testing' come from. I thought the 2 dots meant to go  
one level higher in the dir structure
and start from there.)

Whatever I try I can't get this file included.

If anybody has a idea what I am doing wrong please let me know, for I  
am banging my head now for some time.
Even better would be, preferably a one liner, so I can include the  
file from whatever dir the requested page is,
without worring about the number of levels
(I have been trying with a 'hard coded adress like "http://claudi.on-rev.com/lib/cc_Pagestats 
" and with $_SERVER["document_root"]
and a couple of others but unfortunatly nothing.)


All ideas or suggestions are greatly appreciated

    Claudi



More information about the use-livecode mailing list