0

我正在发送这个 url 编码的消息: http ://anydomain.com/message.php?Message=This+is+a+test+message

到这个网址: http ://anydomain.com/message.php

我不知道如何在下面的 $response-> say() 中解码并获得“这是一条测试消息”。这是代码..

<?php

require_once(‘Services/Twilio.php’);

$response = new Services_Twilio_Twiml();

$response->pause(array("length" => 1));
$response->say(*how do i put the url encoded "This is a test message" message here??*, array("voice" => alice));
$response->pause(array("length" => 1));    
$response->say('End of message', array("voice" => alice));

print $response; 

twiml 的其余部分工作......这是新的,所以任何帮助将不胜感激。谢谢-吉姆

4

1 回答 1

1

您应该能够从 $_GET 变量中读取它,只需执行以下操作:

$response->say($_GET['Message'])

其中 Message 是您在 URL 中传递的内容,因此 $_GET['Message'] 将包含“这是一条测试消息”</p>

于 2016-01-07T20:24:19.020 回答