[gollem] configuring for use w/ VFS's file.php
Liam Hoekenga
liamr@umich.edu
Fri, 2 Aug 2002 15:24:53 -0400 (EDT)
> $backends['file system'] = array(
> 'name' => 'Local File System',
> 'driver' => 'file',
> 'params' => array('vfsroot' => '/tmp'));
We're planning on using gollem to allow users to manage the files in their
homedirectories (our webserver handling user authentication, and
authorization to use the filesystem on behalf of the user).
I want to do something like:
$pwinfo = posix_getpwnam($_SERVER['REMOTE_USER']);
$backends['localfile'] = array(
'name' => 'Local File System',
'driver' => 'file',
'params' => array('vfsroot' => $pwinfo['dir']));
but I'd rather not have to throw that extra variable in there. My
knowledge of php is thin here... Is there anyway to reference an element
of an array returned by a function? ie:
posix_getpwnam($_SERVER['REMOTE_USER'])['dir']
(which doesn't work...)
ideas?