previousFile_HtAccess::setProperties() (Previous) (Next) File_HtAccess::setAuthGroupFile()next

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

File_HtAccess::setAuthUserFile()

File_HtAccess::setAuthUserFile() – authuserfile プロパティの値を設定する

Synopsis

void File_HtAccess::setAuthUserFile ( string $file )

Description

authuserfile プロパティの値を設定します。AuthUserFile はユーザー名:パスワードのペアを含む Basic 認証のためのパスワードファイルです。 動作させるためにはパスワードファイルへのフルパスを与える必要があります。

Parameter

  • string $file - パスワードファイルへの絶対パス名を指定します。

Return value

void

Note

This function can not be called statically.

Example

File_HtAccess::setAuthUserFile() の使用

<?php
require_once('File/HtAccess.php');

/* パスワードファイルに /etc/htpasswd を使用する */
$fh = new File_HtAccess('.htaccess');
$fh->load();
$fh->setAuthUserFile('/etc/htpasswd');
$fh->save();

/* パスワードファイルにカレントディレクトリにある .htpasswd を使用する */
$file getcwd() . '/.htpasswd';
$fh = new File_HtAccess('.htaccess');
$fh->load();
$fh->setAuthUserFile($file);
$fh->save();

?>
previousFile_HtAccess::setProperties() (Previous) (Next) File_HtAccess::setAuthGroupFile()next

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.