如何 Gammu 发送 php shell_exec windows 7 和 xampp? [英] How to Gammu sendsms php shell_exec windows 7 and xampp?

查看:36
本文介绍了如何 Gammu 发送 php shell_exec windows 7 和 xampp?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 XAMPP 最新版本并安装了 gammu.

I have already installed XAMPP latest version and installed gammu.

在终端我可以发送短信或识别我的手机,但如果我在 php shell_exec 或 exec 上尝试相同的命令,就会出现问题.

In terminal I can send sms or identify my cellphone, but if i try the same command on php shell_exec or exec there is something wrong.

命令:

"C:\Program Files\gammu\bin\gammu.exe" --sendsms TEXT 06706177529 -text "halooo"
This works.

php中的命令:

$a = shell_exec('"C:\Program Files\gammu\bin\gammu.exe" --sendsms TEXT 06706177529 -text "halooo"');

这封信给我:

警告:未找到配置文件!警告:未读取配置,使用内置默认值!打开设备时出错,它不存在.

Warning: No configuration file found! Warning: No configuration read, using builtin defaults! Error opening device, it doesn't exist.

有什么问题?

推荐答案

其实我的解决方案还不错.我只需要将 gammu 的配置文件复制到包含代码的 php 中.所以配置需要和php在同一个文件夹中.

Actually my solution wasnt bad. I just had to copy the configuration files of gammu to the php wich hast the code. So the config needs to be in the same folder with the php.

这篇关于如何 Gammu 发送 php shell_exec windows 7 和 xampp?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆