$myfile = fopen("Cadence_html.txt", "r") or die("Unable to open file!");
$i = 0;
while(!feof($myfile)) {
$a=fgets($myfile);
if( (strpos($a, 'User') === false)
&& (strpos($a, '***') === false)
&& (strpos($a, '!!!') === false)
&& (strpos($a, 'RESERVATION') === false) ) {
$i = $i + 1;
echo '<a href="rey.php">**Kill**_____</a>';
}
if(strpos($a, '!!!') !== false) {
echo '<br>';
} else {
echo $a.'<br>';
}
}
fclose($myfile);`
在这里,每次迭代$i都会递增,因此**Kill**
链接是在循环中形成的。我需要为相应的**Kill**
链接传递 $i 的值。
我不太确定这是否是你的意思?
$i++;
echo'<a href="rey.php?i='.$i.'">**Kill**_____</a>';
}