Kod
<?
$lines=file("download.dat");
$stan=0;
for($n=0; $n<count($lines); $n++)
{
$str=explode(",",$lines[$n]);
if(chop($str[1])=="$id")
{
settype($str[0],"integer");
$str[0]++;
$lines[$n]=implode(",",$str);
$stan=1;
}
}
$plik=fopen("download.dat","w");
flock($plik,2);
if($stan==0) fputs($plik,"1,$idn");
for($n=0; $n<count($lines); $n++) fputs($plik,chop($lines[$n])."n");
flock($plik,3);
fclose($plik);
header("Location: $id");
?>
i jak go wklejam w plika index.php to jak jest index.php?id=11 to zostaje z tego tylko 11 ale nie że w kodzie ale kiedy klikne to mnie przenosi do 11 bez czesci index.php?id= ni wm co jest pomocy!!!!!
$lines=file("download.dat");
$stan=0;
for($n=0; $n<count($lines); $n++)
{
$str=explode(",",$lines[$n]);
if(chop($str[1])=="$id")
{
settype($str[0],"integer");
$str[0]++;
$lines[$n]=implode(",",$str);
$stan=1;
}
}
$plik=fopen("download.dat","w");
flock($plik,2);
if($stan==0) fputs($plik,"1,$idn");
for($n=0; $n<count($lines); $n++) fputs($plik,chop($lines[$n])."n");
flock($plik,3);
fclose($plik);
header("Location: $id");
?>