PHP7中文手册2018 带注释 最新chm版
安装方法
root@kostiahome:/var/www/wap/www# composer require --prefer-dist "linslin/yii2-curl:*"
使用方法
use linslin\yii2\curl;
插件地址
http://www.yiiframework.com/extension/yii2-curl/
root@kostiahome:/var/www/wap/www# composer require --prefer-dist "linslin/yii2-curl:*"
使用方法
use linslin\yii2\curl;
1
2
3
4
5
6
7
8
9
10
11
12
13
|
public function actionCurl($value =0)
{
$url = 'http://yandex.ru/search/';
$curl = new curl\Curl();
//post http://example.com/, reset request before
$response = $curl->reset()->setOption(
CURLOPT_POSTFIELDS,
http_build_query(array(
'text' => $value
)
))->post($url);
return $curl->response;
}
|
插件地址
http://www.yiiframework.com/extension/yii2-curl/
转载请注明:谷谷点程序 » yii2 curl的使用办法