I've inherited some code that I'm working with. I've done more in Perl than php, so it's a bit tough ironing all this out.
I'm working to bring the php code up to speed with some newer software, and I keep running into broken code. Surprise! Here's my current quandry:
// First find the maximum value of $p,
// and count the rows.
$cnt="0";
$s = "0";
$fp=fopen($reportfile,'r');
while ( !feof($fp) ) {
list($d,$p,$count)=split("\t",fgets($fp,1000));
if ($p > $s) { $s = $p; }
$cnt += 1;
}
rewind($fp);
I've dug through the online docs for each of the functions involved, but I still can't figure out the error I have, below:
PHP Notice: Undefined offset: 2 in - on line 92
PHP Notice: Undefined offset: 1 in - on line 92
PHP Notice: Undefined offset: 2 in - on line 122
PHP Notice: Undefined offset: 1 in - on line 122
PNG
cHsI#0d»ìFÛvïÆÃÍFÕ
IHDRvµ$PLTEÿÿÿÿÿÿÿÿ}}}¾áÿôÞºëÒ¹ëëë77´«#=IDAT8 i¯[ü&¿ôpó¨ÞÑ´1ªr½ÄƯ1¦ÔÈî¼ÄYñýIEND®B
The garbage at the end is the graphic this script generates. I'm calling it a bit out of context for debugging (this error exists both ways).
Any ideas? Anyone...Anyone...Bueller?
Thanks,
monger