$response = curl_exec($ch);
curl_close($ch);
//Split the HEADERS and BODY
list($h, $EALOGIN) = explode("\r\n\r\n", $response, 2);
$r = explode("\r\n", $h);
//EASW Key
$s = explode(":", $r[7]);
$t = explode(";", $s[1]);
$EASW_KEY = $t[0];
//Session Key
$m = explode(":", $r[8]);
$n = explode(";", $m[1]);
$EASF_SESS = $n[0];
//nuc
$a = explode("<nucleusId>", $EALOGIN);
$b = explode("</nucleusId>", $a[1]);
$NUC = $b[0];
脫機指的是「$ a」行。 我不明白這個錯誤。 我該如何解決它?未定義偏移量:1 php
看看這裏:http://stackoverflow.com/questions/5400332/php-error-undefined -offset-1 – SenorAmor
這可能不是一個錯誤。仔細觀察,這是一個警告! $ a僅包含一個索引爲「0」的單個元素。所以'$ a [1]'不存在。 – arkascha