php5.6开启curl
2024-09-01 18:06:27
1. 打开php安装目录,打开ext目录,是否有php_curl.dll扩展文件,如果没有该扩展文件,请在网上下载此文件。
2. 打开php.ini,找到 ;extension=php_curl.dll, 去掉注释,重启Apache
3. 在php下的ext目录找到libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll,将这四个文件复制到windows/system32下。
4. 将libssh2.dll复制到Apahe 下的bin目录下。
5. 打开phpinfo,查看是否有curl模块。
<?php $url = "http://www.kuaidi.com/index-ajaxselectcourierinfo-430279591825-zhongtong.html";
// create curl resource
$ch = curl_init(); // set url
curl_setopt($ch, CURLOPT_URL, $url); // return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // $output contains the output string
$output = curl_exec($ch); // close curl resource to free up system resources
curl_close($ch); echo $output;
参考文档:http://blog.csdn.net/kevinbai_cn/article/details/53066331
http://php.net/manual/zh/curl.installation.php
最新文章
- DOMO1
- C#的变迁史 - C# 4.0 之线程安全集合篇
- ASP.NET 5探险(8):利用中间件、TagHelper来在MVC 6中实现Captcha
- NEC学习 ---- 模块 - 上图下文图文列表
- Docker 在6.4上安装
- 【JavaScript】关于JS中的constructor与prototype
- sublime 设置文件默认打开方式
- 制作SSL证书
- 初涉JavaScript模式 (7) : 原型模式 【三】
- Codeforces #245(div2)
- multi-threaded copy command - robocopy
- vue-miniQQ——基于Vue2实现的仿手机QQ单页面应用(接入了聊天机器人,能够进行正常对话)
- LCA算法解析-Tarjan&;倍增&;RMQ
- 重温js之null和undefind区别
- 【翻译自mos文章】Windows平台下的 Oraagent Memory Leak
- vue-meta
- centos samba搭建
- 工作中,ES6 可能掌握这些就足够了
- Microsoft Toolkit.exe激活office 2010方法
- Output assignment statements in the output statement