$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的值。
答案 0 :(得分:0)
我不确定这是不是你的意思?
$i++;
echo'<a href="rey.php?i='.$i.'">**Kill**_____</a>';
}