<?php
require_once('File/HtAccess.php');
/* let any valid user access the resource */
$fh = new File_HtAccess('.htaccess');
$params['authname'] = 'Private';
$params['authtype'] = 'Basic';
$params['authuserfile'] = '/path/to/.htpasswd';
$params['authgroupfile'] = '/path/to/.htgroup';
$params['require'] = array('group', 'admins');
$fh->setProperties($params);
?> |