On Fri, Jul 23, 1999 at 02:23:42PM -0400, Amir Karger wrote:
>
> Well, aside from acting on those thoughts, I think I want to do a bit more
> reorganizing. Specifically, there are now some 34 files + the lgt directory.
> I therefore propose creating the subdirectories about, download, and
> internet, and putting the subpages (and gifs) into them. The bad news is
> that this would require making the links things like "/index.php3" instead
> of just "index.php3". Not too big a deal.
So I tried to do this. Unfortunately, it ends up not working after all.
Basically, the problem is that on sunsite, /index.php3 becomes
sunsite.auc.dk/index.php3, which is not what we want! We might be able to
get around this with fancy regexps, but that would make creating links among
the web pages pretty complicated (something like
href="<?php $LYX ?>foo.php3"
where $LYX is set either to "../" or "/wherever/the/lyx/main/directory/is",
which seems like a lot of work for a simple link. Of course, if we're
guaranteed always to be at the top level of the domain (i.e. we know that
"/" in a link will take us to www.xx.lyx.org) then it might work. In that
case, the only problem is that I can't actually test it, because it won't
work on sunsite.
Which is too bad because the sub-directory thing seemed to be working until
I hit that snag.
> Isn't there a php3 function that figures out the current page's address?
> Then just cut off the www.lyx.org part!
I'm becoming somewhat less impressed with php as time goes on. It seems like
it's missing simple Perl stuff (e.g. "push" was just added for v4.0 beta,
ways of handling lists, etc.). Also, the manual seems really big, but if
you're not looking to use sybase or oracle or whatever, what's left seems
kind of sparse. I suppose the power of PHP really comes in when you do want
to interface with these database programs, but I'm not doing that, so I'm
just getting annoyed. And I *still* can't really find the a variable that
tells you which file you're looking at. PHP_SELF might be it, but I can't
tell, because grepping for it in the manual only finds it in an example on a
page that's Apache-specific. Arg!
-Amir