PHP curl_close函数
PHP 教程
· 2019-01-23 10:43:11
(PHP 4 >= 4.0.2, PHP 5)
curl_close — 关闭一个cURL会话
说明
void curl_close ( resource $ch )
关闭一个cURL会话并且释放所有资源。cURL句柄ch 也会被释放。
参数
ch
由 curl_init() 返回的 cURL 句柄。
返回值
没有返回值。
实例
初始化一个cURL会话来获取一个网页
<?php // 创建一个新cURL资源 $ch = curl_init(); // 设置URL和相应的选项 curl_setopt($ch, CURLOPT_URL, "http://www.w3cschool.cc/"); curl_setopt($ch, CURLOPT_HEADER, 0); // 抓取URL并把它传递给浏览器 curl_exec($ch); // 关闭cURL资源,并且释放系统资源 curl_close($ch); ?>
参见
- curl_init() - 初始化一个cURL会话
- curl_multi_close() - 关闭一组cURL句柄
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
Head First Python
Paul Barry / O'Reilly Media / 2010-11-30 / USD 49.99
Are you keen to add Python to your programming skills? Learn quickly and have some fun at the same time with Head First Python. This book takes you beyond typical how-to manuals with engaging images, ......一起来看看 《Head First Python》 这本书的介绍吧!