PHP:curl_setopt_array给出通知“数组到字符串转换”
curl_setopt_array($ ch,$ curl_opt);
此代码提供通知注意:在...中数组到字符串转换
这是 $ curl_opt
contains:
This is what $curl_opt
contains:
array (size=5)
42 => boolean true
19913 => boolean true
10018 => string 'PHP RestClient/0.1.2' (length=20)
10005 =>
array (size=1)
0 => string 'user:password' (length=13)
10002 => string 'http://longurl.com/' (length=389)
is_array($ curl_opt)
返回 true
,所以我不知道是什么引起通知。
is_array($curl_opt)
returns true
, so I don't really know what's causing the notice.
我想我只是在这里简单地缺少一些东西,但是我只是不能,在我的生活中,这一个。
I think I'm just missing something really simple here but I just cannot, for the life of me, figure this one out.
这只是一个通知,并没有打破任何东西,但它只是惹恼我,我不知道是什么造成它。
It's just a notice and doesn't break anything but it just annoys me that I don't know what's causing it.
$ curl_opt
应为 / strong> array ................................
$curl_opt
should be a one-dimensional array................................
键 10005
不是这种情况,应该是
The key 10005
is not that case, it should be
$curl_opt = array(
//...
CURLOPT_USERPWD => '[username]:[password]'
//...
);