我正在通過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
?任何想法是什麼導致這種奇怪的行爲?