我正在通过PHP exec()
函数执行php函数,但它似乎只在时间通过1个变量。Shell命令不能通过exec()在php
$url = "http://domain.co/test.php?phone=123&msg=testing"
exec('wget '.$url);
在test.php的文件,我有
$msg = "msg =".$_GET["msg"]." number=".$_GET["phone"];
mail('[email protected]', 'Working?', $msg);
我得到的只有返回电话可变的电子邮件。
但如果我更改网址如下
$url = "http://domain.co/test.php?msg=testing&phone=123"
我得到msg
但不phone
?任何想法是什么导致这种奇怪的行为?