Rewrite that loop like so:
This breaks the loop if the file is bad or simply reached the end.PHP Code:$found = false;
$fp = fopen(...);
while($fp && ($tmpecho = fgets($fp, 1024))) {
if(strpos($tmpecho, "Building configuration...") !== false) {
$found = true;
break;
}
}




CornedBee
Reply With Quote