File_HtAccess::setAuthType
File_HtAccess::setAuthType – set the value of authtype property
Synopsis
void File_HtAccess::setAuthType (
string $type='Basic'
)
Description
Sets the value of authtype property. Almost allways you will be using Basic authentication. Since most browsers don't yet support Digest authentication you should only use Digest if you can control what browsers will be accessing the resources.
Parameter
-
string $type
- authentication type to use. Should be Basic os Digest. Defaults to Basic.
Return value
void
Note
This function can not be called statically.
Example
Using File_HtAccess::setAuthType()
<?php
require_once('File/HtAccess.php');
/* use Digest authentication */
$fh = new File_HtAccess('.htaccess');
$fh->load();
$fh->setAuthType('Digest');
$fh->save();
?>