我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

php shell_exec iwgetid忽略引号

I am trying to get the SSID from a Linux machine with PHP, but with shell_exec values between quotes seem to be ignored.

In the cli the result of iwgetid is:

wlan0     ESSID:"test"

However if I do the same with PHP using shell_exec:

$ssidInfo = shell_exec("iwgetid");

I get the following result:

wlan0     ESSID:

Is there a way to work around this?

近期文章

  • Codeigniter 3控制器请求两次
  • 通过API获取数百万条记录
  • 使用HTML2PDF类进行html到pdf的转换
  • Wordpress在可视化编辑器中删除base64图像
  • 如何使用PHP将图像存储到amazonaws服务器
  • 在php回显字符串中调用js函数,onclick的正确方法
  • NetBeans远程项目无法保存:550无法删除(filename.php.new)。 没有相应的文件和目录
  • Laravel 5.0 auth控制器无限重定向循环
  • DOMPDF file_exists():open_basedir限制生效。 File()不在允许的路径中:
  • PHP MongoDB驱动程序结果数组中'err'和'errmsg'之间的区别是什么?
  • 跨源请求被阻止?!(原因:缺少CORS标头'Access-Control-Allow-Origin')
  • doctrine 2 - 用户提供者必须是WebserviceUserRepository的实例
  • Symfony中的PHPUnit会在灯具中缓存时间,打破基于时间的测试
  • PHP中的Hmac-sha1
  • 在悬停上显示MySQL数据
  • 使用DOM编写XML文件
  • PHP:图片不会显示
  • 如何在php中解析数组
  • 文本框以XML / VML自定义
  • 拿表格行隐藏字段值?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华