Re: File_HtAccess

From: Date: Fri, 25 Oct 2002 20:42:37 +0000
Subject: Re: File_HtAccess
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-10260@lists.php.net to get a copy of this message
On 2002-10-25 21:37, while getting another beer from the fridge I saw a little yellow card, on which Mika Tuupola wrote:
Suggesting a package to accompany File_Passwd - File_HtAccess class for manipulating .htaccess files. http://www.appelsiini.net/~tuupola/php/File_HtAccess/HtAccess.phps 90% finished at the url above. Still need to add phpdoc, enhance error handling, consider filelocking and add some helper methods such as adduser() and delUser(). I use it for production allready in my own projects. Usage for example for modifying existing .htaccess file: $h = new File_HtAccess('.htaccess');
        $h->load()
$h->setRequire('valid-user');
        $h->save();
Usage for example for creating a new .htaccess file:
	$params['authname']      = 'Test';
	$params['authtype']      = 'Basic';
$params['authuserfile'] = '.htpasswd'; $params['authgroupfile'] = '.htgroup';
	$params['require']       = array('group'', 'admins');
$h = new File_HtAccess('.htaccess', $params );
        $h->save()
If interested +1's are welcome :) +1 from me
Voyteck

« previous php.pear.dev (#10260) next »