curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in
当系统开启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),或者改为0,在php函数中自定义一个函数
curl_redir_exec函数
curl_redir_exec
curl_redir_exec($ch)替换curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true)语句
参考:
http://spoint.babyshoot.cn/archives/2009/11/curlopt-php.html
http://www.php.net/manual/en/function.curl-setopt.php
curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in的更多相关文章
- Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set…
php打印小票错误提示:Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activate ...
- 当系统开启safe_mode和 open_basedir
当系统开启safe_mode和 open_basedir,在程序中使用以下语句curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);并且遇到301,302状态吗时 ...
- BTC功能类
<?php/*EasyBitcoin-PHP A simple class for making calls to Bitcoin's API using PHP.https://github. ...
- add web server(nginx+apache)
#!/bin/bash # # Web Server Install Script # Last Updated 2012.09.24 # ##### modify by WanJie 2012.09 ...
- apache虚拟主机配置及常用安全配置
环境准备: 服务器系统:CentOS 6.5 安装lamp环境: yum -y install mysql mysql-server php php-mysql httpd php-gd* freet ...
- PHPAdmin的安装和配置
phpadmin是用于管理mysql数据库的一个产品,,毕竟很多数据库服务器不能够公开连接,所以只能够使用http的方式来进行连接管理. 下载phpadmin( http://xj-http. ...
- nginx反向代理结合apache和php的配置示例
.前端nginx主配置文件 # cat nginx.conf worker_processes ; #pid logs/nginx.pid; pid /data/www/logs/nginx.pid; ...
- PHP中CURL方法curl_setopt()函数的参数
PHP CURL curl_setopt 参数 bool curl_setopt (int ch, string option, mixed value)curl_setopt()函数将为一个CURL ...
- PHP中CURL方法curl_setopt()函数的一些参数 (转)
bool curl_setopt (int ch, string option, mixed value) curl_setopt()函数将为一个CURL会话设置选项.option参数是你想要的设置, ...
随机推荐
- NSUserDefaults API简单的介绍和使用英文文件
Overview The NSUserDefaults class provides a programmatic interface for interacting with the default ...
- OCEANIAERP对接-code盘点机并存储实时库存计划和方案的使用,实时库存,云清查方案
1. PDA手持设备按键说明 [Tab]键:使输入焦点在控件上切换. [ESC]键:弹出是否退出确认对话框,退出操作界面或程序. [OK]键:确认输入或选择,进入下一步操作. [C]键:删除键 ...
- 最具体的历史centos下一个 postfix + extmail + dovecot + maildrop 安装注意事项2014更新
这篇文章原本是2008年发表的,近期几天照此笔记又安装了一遍系统.这里更新一下记录. 作者:wangdy 本文发表于 http://blog.csdn.net/aryang/article/deta ...
- T-SQL性能调整——信息收集
原文:T-SQL性能调整--信息收集 IO信息(自服务器启动开始) --Database IO analysis WITH IOFORDATABASE AS ( SELECT DB_NAME(VFS. ...
- linux VIM基本命令
linux VIM命令: vim 在命令行中输入vim,进入vim编辑器 Esc 退出i(插入)命令进行其他命令使用 :sh 进入shell命令行,运行完命令后ctrl+d退出又一次进入vim编辑继续 ...
- spring与mybatis集成和事务控制
一个. 基本介绍 本文将使用spring整合mybatis, 并加入事务管理, 以此为记, 方便以后查阅. 二. 样例 1. 代码结构图: 2. 建表语句: DROP DATABASE test; C ...
- HDU 1086:You can Solve a Geometry Problem too
pid=1086">You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others) Mem ...
- lol盒子重点内容
//AFN函数 - imageview载入网络图片而且获取图片,获取之后存储到手机 [image setImageWithURLRequest:[NSURLRequest requestWithU ...
- Jplayer小样
最近应公司要求需要一个MP3播放的插件,网上找了很多插件,看来看去还是jPlayer用着最舒服也最容易扩展.所以就找了个资料研究了下,简单做了个小DEMO.支持实时控制列表,常见的播放器功能. jPl ...
- 创建线程的两种方式:继承Thread类和实现Runnable接口
第一种方式:继承Thread类 步骤:1.定义类继承Thread 2.覆写Threa类的run方法. 自定义代码放在run方法中,让线程运行 3.调用线程的star方法, 该线程有两个作用:启动线程, ...