Kód: Vybrať všetko
Warning: file_get_contents(a /xyzs.txt) [function.file-get-contents]: failed to open stream: Invalid argument in C:\xampp\htdocs\nieco2.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\nieco2.php:5) in C:\xampp\htdocs\nieco2.php on line 12
a nemám tam medzeru... mam to pod sebou
b
a
nieco2.php
Kód: Vybrať všetko
<?php
$subor = file('a.txt');
$vybraneSlovo = $subor[mt_rand(0,count($subor)-1)];
$int = file_get_contents($vybraneSlovo . "/xyzs.txt");
$file = fopen(trim($vybraneSlovo) . "/xyzs.txt", "w");
if($int>0){fwrite($file, --$int);}
else{fwrite($file, $int);}
fclose($file);
Header("Location: index.php");
?>
//autoeditácia príspevku (31 Okt 2010, 11:43)
ešte som to spravil takto: že do a.txt som dal a/ a pod to b/ a v nieco2.php som vymazal
<?php
$subor = file('a.txt');
$vybraneSlovo = $subor[mt_rand(0,count($subor)-1)];
$int = file_get_contents($vybraneSlovo."
/xyzs.txt");
$file = fopen(trim($vybraneSlovo)."
/xyzs.txt", "w");
if($int>0){fwrite($file, --$int);}
else{fwrite($file, $int);}
fclose($file);
Header("Location: index.php");
?>
a teraz mi to tiez vyhadzuje ale takto
Kód: Vybrať všetko
Warning: file_get_contents(a/ xyzs.txt) [function.file-get-contents]: failed to open stream: Invalid argument in C:\xampp\htdocs\nieco2.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\nieco2.php:5) in C:\xampp\htdocs\nieco2.php on line 12