File_HtAccess::getRequire() -- get the value(s) of require property
Description
Get the value(s) of require property as an array. Require property
contains the usernames or groups users who are allowed to access
protected resources. Value valid-user means all users listed in
password file are allowed to access.
Return value
mixed string or array depending on $type parameter.
Note
This function can not be called
statically.
Example
Example 44-1. Using File_HtAccess::getrequire()
<?php
require_once('File/HtAccess.php');
/* add user tuupola and viemero to list of users to be granted access */
$fh = new File_HtAccess('.htaccess');
$fh->addRequire('tuupola');
$fh->addRequire('viemero');
$require1 = $fh->getRequire();
$require2 = $fh->getRequire('string');
print_r($require1);
/* Array */
/* ( */
/* [0] => tuupola */
/* [1] => viemero */
/* ) */
print_r($require2);
/* tuupola viemero */
?>
|
|