D:>nbtstat -a IPAddr
查看一下那个用户所在的机器的当前用户名

解决方案 »

  1.   

    win2k professional!
    是不是只有管理员的权限才可以.
      

  2.   

    echo gethostbyaddr(getenv('REMOTE_ADDR')
     //getenv("REMOTE_ADDR") 得到浏览者的IP地址, gethostbyaddr($ip) 根据IP得到主机名字。 
    这是我变通的解决方法。
      

  3.   

    Windows 2000 and later: Use the GetUserNameEx function to retrieve the user name in a specified format. Additional information is provided by the interface. BOOL GetUserName(
      LPTSTR lpBuffer,  // name buffer
      LPDWORD nSize     // size of name buffer
    );
    Parameters
    lpBuffer 
    [out] Pointer to the buffer to receive the null-terminated string containing the user's logon name. If this buffer is not large enough to contain the entire user name, the function fails. A buffer size of (UNLEN + 1) characters will hold the maximum length user name including the terminating null character. UNLEN is defined in Lmcons.h. 
    nSize 
    [in/out] On input, specifies the maximum size, in TCHARs, of the buffer specified by the lpBuffer parameter. On output, receives the number of characters copied to the buffer. 
    If the buffer is not large enough, the function fails and nSize receives the required buffer size, in TCHARs, including the terminating null character. Return Values
    If the function succeeds, the return value is a nonzero value, and the variable pointed to by nSize contains the number of TCHARs copied to the buffer specified by lpBuffer, including the terminating null character. If the function fails, the return value is zero. To get extended error information, call .
    MSDN上的!你可以写个com试试