最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
解决WordPress结构化数据插件Warning: curl_setopt() [function.curl-setopt]
时间:2014-03-31 编辑:简简单单 来源:一聚教程网
一、站点校验始终显示“校验中…”
我使用WordPress结构化数据插件遇到的两个问题
不清楚这是什么原因,已经向站长反馈中心提交了问题,还未答复。如果有答复,三好公民会第一时间来分享的,期待。
当然,如果您知道原因的话,还望不吝赐教,非常感谢!
二、发布或更新文章时显示警告代码
启用WordPress结构化数据插件之后,发布文章或更新文章时就会出现错误代码,内容为:
代码如下 | 复制代码 |
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION Warning: Cannot modify header information - Warning: Cannot modify header information – headers |
碰到此问题解决办法参考下面方法
当系统开启safe_mode和 open_basedir,在程序中使用以下语句
代码如下 | 复制代码 |
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); |
并且遇到301,302状态吗时会出现错误
[11-Oct-2010 14:17:41] PHP Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in msn.class.php on line 819
解决方法是在curl语句用不使用curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true),在php函数中自定义一个函数
curl_redir_exec函数
curl_redir_exec
curl_redir_exec($ch)替换curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true)语句
相关文章
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31
- html使用表单标签实现注册页面代码展示 10-31
- 使用HTML截图并保存为本地图片的代码展示 10-31