previousFile_SMBPasswd::unlock() (Previous) (Next) File_SMBPasswd::printAccounts()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_SMBPasswd::save()

File_SMBPasswd::save() – smbpasswd ファイルを保存する

Synopsis

mixed File_SMBPasswds:save ( )

Description

File_SMBPasswd オブジェクトの内容を対応するディスク上の smbpasswd ファイルとして保存します。保存時、ファイルは暗黙的にロックされます。

Return value

mixed - Returns TRUE on success, PEAR_Error on failure.

Note

This function can not be called statically.

Example

File_SMBPasswd::save() の使用例

<?php
require_once('File_SMBPasswd.php');

$f = new File_SMBPasswd('./smbpasswd');
$f->load();
$ret $f->addAccount('sepp3'12'MyPw');
if (
PEAR::isError($ret)) {
    echo 
$ret->getMessage();
    exit;
}
$ret $f->modAccount('sepp''''MyPw');
if (
PEAR::isError($ret)) {
    echo 
$ret->getMessage();
    exit;
}
$ret $f->delAccount('karli');
if (
PEAR::isError($ret)) {
    echo 
$ret->getMessage();
    exit;
}

$status $f->save();

if (
PEAR::isError($status)) {
    
// エラーを処理する
} else {
    
// 処理を続ける
}

?>
previousFile_SMBPasswd::unlock() (Previous) (Next) File_SMBPasswd::printAccounts()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.