2017-10-09 62 views
0

我得到這個PHP錯誤:PHP公告:未定義抵消:1的陣列

PHP Notice: Undefined offset: 1

preg_match('!select \'(.*)\' AS!s', $html, $matches); 
$count = $matches[1]; 
echo "[+] Count: $count\n"; 

for ($i = 0; $i <= $count; $i++) 
{ 
    if ($count == 1) 
    { 
     $num = "0,1"; 
    } 
    else 
    { 
     $num = "$i,1"; 
    } 
} 

回答

0

我假設有在$matches[1]不匹配,因此偏移1是無效的!