今天在公司研究PHP使用Lotus notes 的COM,IBM 的这篇Common ground: COM access to Domino objects可以做参考!
$session = new COM( "Lotus.NotesSession" );
$session->Initialize("yourpassword");
$dir = $session->GetDbDirectory("");
$db = $dir->GetFirstDatabase(1247);
while (is_object($db))
{
echo $db->Title."and".$db->Filepath."\n";
$db = $dir->GetNextDatabase();
}
?>
程式码中的1247,参考这一段‘In late-binding COM code, the constants are not available and you must specify their integer values: 1245 (REPLICA_CANDIDATE), 1246 (TEMPLATE_CANDIDATE), 1247 (NOTES_DATABASE), and 1248 (TEMPLATE).’
这样会列出你电脑中的nsf的档案目录,方便你接下来的程式!
2008-05-09