本文整理匯總了PHP中Zend_Rest_Client::parrot方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Rest_Client::parrot方法的具體用法?PHP Zend_Rest_Client::parrot怎麽用?PHP Zend_Rest_Client::parrot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Rest_Client
的用法示例。
在下文中一共展示了Zend_Rest_Client::parrot方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: htmlspecialchars
<?php
// Change your server path here
$server = "http://127.0.0.1/Rest_Test/server.php";
// 1st test, manual call to service using HttpClient
require_once 'Zend/Http/Client.php';
$client = new Zend_Http_Client($server . '?method=parrot&arg1=This%20is%20my%20string');
echo "Result using Zend_Http_Client:<br>";
echo htmlspecialchars($client->request()->getBody());
echo '<hr>';
// 2nd test, call to service using Zend_Rest_Client
require_once 'Zend/Rest/Client.php';
$rest = new Zend_Rest_Client($server);
// Should parrot the input string, but it fails
echo "Result using Zend_Rest_Client:<br>";
echo $rest->parrot('This is my string')->get();