Re: Setting up large scale virtual hosting
Davide Bianchi wrote:
> Actually, it teaches them how to code their stuff so it's independant
> from *where* is actually installed (relative path as opposed as
> absolute ones).
Being smart about relative paths is assumed. I had something else in
mind. In the php context (if any of the students ever get that far)
you (I) often need to translate back and forth between file paths and
urls. Php's $_SERVER['DOCUMENT_ROOT'] becomes useless in the
~username/public_html context.
......make a simple, semi-automatic image gallery by reading a directory:
$url = some_php_str_replace_func($_SERVER['DOCUMENT_ROOT'],"",$path);
That sort of thing gets ugly in ~home accounts, especially if you want
to write code that would also work under a real document_root.
|