PHP curl函数返回301 Moved Permanently问题【转】

时间:2020-07-03 16:03:14   收藏:0   阅读:199

添加一行curl_setopt:

curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);

这句话的意思是当遇到location跳转时,直接抓取跳转的页面。
?
参考链接:
https://blog.csdn.net/Angus_01/article/details/82467652
https://blog.csdn.net/linux4fun/article/details/50014961

原文:https://www.cnblogs.com/KillBugMe/p/13230707.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!