javascript - 如何在没有asp.net的xampp中在客户端检索当前Windows用户名
问题描述
我正在尝试在我的网站中检索 windows 当前用户名以显示它。我知道在 asp.net 中是可能的
HttpContext.Current.User.Identity.Name
我如何在没有asp.net 的情况下通过使用javascript、python 或php 来实现这一点。
也在php中使用
getenv("username")
给我服务器系统的当前用户,但我想要客户端系统的用户名
解决方案
推荐阅读
- node.js - 在不安装的情况下检索有关已安装 npm 包的名称和信息
- azure-functions - Azure Functions:使用 Log4j2 配置 Slf4j 绑定并将日志发送到 appinsights
- pycharm - Pycharm - 在默认浏览器中显示结果/log.html 的快捷方式
- python - 如何使用kivy对齐矩形?
- python - 如何在列表中的另一个值之前删除一个元组
- razor - 如何在 2sxc 剃须刀模板中输出项目的创建、发布和修改日期/时间?
- r - 使用包“cmprsk”在 R 中自定义竞争风险图
- angular - RxJS 操作员在后台使用 .subscribe() 吗?
- flutter - 如何通过单击 Flutter 页面中存在的按钮导航到 BottomNavigationBar 的页面之一?
- python - 为列表中的每个条目创建标签,但最后一个条目没有创建标签