Hi everyone, I have been with this problem for a few days and nearly loosing it!
This is an assignment for college and I have managed to do all the tasks required. But I keep on getting these errors :
Notice: Undefined offset: 5 in ./whileFile.php on line 33
Notice: Undefined offset: 8 in ./whileFile.php on line 41
Notice: Undefined offset: 7 in ./whileFile.php on line 44
They are the keys of the array I have exploded.
My code is below, any help much appreciated!!!
$detail = separate ($handle);
// Explodes the data within the array with a forward slash
$subject = single($detail[5]);
if ($subject[0] == $value)
{
$dir++;
}
// Adds all the bytes and stores them in $totalBytes
$totalBytes = $totalBytes + (int)($detail[8]);
$errorT = "404";
if ($detail[7] == $errorT)
{
$fileNotFound++;
if (!in_array($detail[5], $errors))
{
$errors[] = $detail[5];
}
}
}

