Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-21 09:06:27
Original
1521 people have browsed it

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函数调用系统组件实现的~~不过 这个函数有点危险性~~



    Related labels:
    source:php.cn
    Statement of this Website
    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
    Popular Recommendations
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template