E:\work\web\SDN\recipe-nddocs\cpp>echo > vote.txt
E:\work\web\SDN\recipe-nddocs\cpp>php
<?
$file= "vote.txt";
$data=file($file);
$i=1;
$qty=Count($data);
$n=0;
while($i <= $qty):
$data[$i]=trim(str_replace("\n","",$data[$i]));
$n=$n+$data[$i];
$i++;
endwhile;
if($answer=!""){
echo "<br>Nianeai!";
$data[$answer]++ ; $n++;
$res="?acoeuoaou aieiniaaiey\n".$data[1]."\n".$data[2]."\n".$data[3]."\n".$data[4];
$fp=@fopen($file,"w");
if($fp){$counter=fputs($fp,$res); fclose($fp);
}else
{ echo "Ioeaea caiene a oaee";}
} else {echo "<br>?acoeuoaou aieiniaaiey" ;}
echo "Iiaue aecaei - <b>".$data[1]."</b>";
echo "Noa?ue aecaei - <b>".$data[2]."</b>";
echo "Ieeaeie - <b>".$data[3]."</b>";
echo "Iia ana ?aaii - <b>".$data[4]."</b>";
echo "<br><br>Anaai aieinia: ".$n;
?>
^Z
Notice: Undefined offset: 1 in E:\work\web\SDN\recipe-nddocs\cpp\- on line 8
Call Stack:
10.7452 1. {main}() E:\work\web\SDN\recipe-nddocs\cpp\-:0
<br>Nianeai!
Notice: Undefined offset: 2 in E:\work\web\SDN\recipe-nddocs\cpp\- on line 15
Call Stack:
10.7452 1. {main}() E:\work\web\SDN\recipe-nddocs\cpp\-:0
Notice: Undefined offset: 3 in E:\work\web\SDN\recipe-nddocs\cpp\- on line 15
Call Stack:
10.7452 1. {main}() E:\work\web\SDN\recipe-nddocs\cpp\-:0
Notice: Undefined offset: 4 in E:\work\web\SDN\recipe-nddocs\cpp\- on line 15
Call Stack:
10.7452 1. {main}() E:\work\web\SDN\recipe-nddocs\cpp\-:0
Iiaue aecaei - <b>1</b>
Notice: Undefined offset: 2 in E:\work\web\SDN\recipe-nddocs\cpp\- on line 22
Call Stack:
10.7452 1. {main}() E:\work\web\SDN\recipe-nddocs\cpp\-:0
Noa?ue aecaei - <b></b>
Notice: Undefined offset: 3 in E:\work\web\SDN\recipe-nddocs\cpp\- on line 23
Call Stack:
10.7452 1. {main}() E:\work\web\SDN\recipe-nddocs\cpp\-:0
Ieeaeie - <b></b>
Notice: Undefined offset: 4 in E:\work\web\SDN\recipe-nddocs\cpp\- on line 24
Call Stack:
10.7452 1. {main}() E:\work\web\SDN\recipe-nddocs\cpp\-:0
Iia ana ?aaii - <b></b><br><br>Anaai aieinia: 1
E:\work\web\SDN\recipe-nddocs\cpp>php -v
PHP 5.0.3 (cli) (built: Dec 15 2004 08:07:57)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies
with Xdebug v2.0.0beta2, Copyright (c) 2002, 2003, 2004, by Derick Rethans
E:\work\web\SDN\recipe-nddocs\cpp>