我有 PHP 数组:
$curl_options = array(
CURLOPT_PORT => 80,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 30
);
然后我添加新元素并更改一些值:
$curl_options[CURLOPT_USERAGENT] = "Opera/9.02 (Windows NT 5.1; U; en)";
$curl_options[CURLOPT_PORT] = 90;
在此更改后数组变为
$curl_options = array(
CURLOPT_PORT => 90,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_USERAGENT => Opera/9.02 (Windows NT 5.1; U; en)
);
如何将数组重置为默认值?到
$curl_options = array(
CURLOPT_PORT => 80,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 30
);
谢谢。