我写在我试图提交后可变bash脚本,但是wget的是把它当作多个网址,我相信,因为它不是url编码...这里是我的基本思路
MESSAGE='I am trying to post this information'
wget -O test.txt http://xxxxxxxxx.com/alert.php --post-data 'key=xxxx&message='$MESSAGE''
我得到的错误和alert.php没有获得这个职位变量再加上它漂亮的玉米粥是说
解决不了我无法解决时无法解决尝试..等等。
我上面的例子是一个简单的有点sudo的例子,但我相信,如果我能URL编码,它会通过,我甚至试过PHP这样的:
MESSAGE='I am trying to post this information'
MESSAGE=$(php -r 'echo urlencode("'$MESSAGE'");')
但PHP错误了..任何想法? 我怎么能不通过PHP执行它在$消息的变量?