koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] Re: Auth.pm


From: address@hidden via news-to-mail gateway
Subject: [Koha-devel] Re: Auth.pm
Date: Tue Dec 10 18:51:02 2002

In article <address@hidden>, Finlay Thompson
<address@hidden> wrote:

>This is kind of annoying though. It would be nice if there was
>some way that Auth would know whether it was being called from
>the opac or the intranet. Perhaps there is a $ENV variable that
>says what the site root directory is? That way we could get
>away from having the whole $type thing. It is ugly!

I don't think there is such a thing (for the CGI interface,
not Apache-specific). However, we do have $0, which is "almost
guaranteed" to contain the full path of the script (so we would
be able to deduce the site root directory); this, however, is
not really guaranteed :-/

Or we can try getting the current directory; I believe it at
least is under the correct site root directory.

(My CGI scripts always look at $0. So far it seems that Apache,
Roxen/Caudium, and IIS all set $0 more or less the way I expect
it to, but I don't know how portable this really is.)


-- 
Ambrose Li  <address@hidden>
http://ada.dhs.org/~acli/cmcc/  http://www.cccgt.org/

DRM is theft - We are the stakeholders



reply via email to

[Prev in Thread] Current Thread [Next in Thread]