Home >php教程 >php手册 >PHP5调用win系统com组件查看用户信息

PHP5调用win系统com组件查看用户信息

WBOY
WBOYOriginal
2016-06-21 09:06:271544browse

php5

/*---------用户组信息*/
 $computer=new COM("WinNT://.");
 $computer->Filter=array("User");
 echo "User:


";
 foreach($computer as $user){
  echo "
  • ".$user->Name."
  • ";
     // getUserInfo($user->Name);
      echo "
    ";
     }
     echo "UserGroup:
    ";
     $computer->Filter=array("Group");
     foreach($computer as $group){
      echo "
  • ".$group->Name."
  • ";
      echo $group->Description."
    ";
     }
     echo "
    无名氏作品";

    PHP5 FOR WINXP/2K 测试通过~ 呵呵~~ 主要是采用 php com函数调用系统组件实现的~~不过 这个函数有点危险性~~



    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Previous article:推荐php模板技术Next article:PHP 文件或文件夹拷本