prace se souborem

funguje vám všem nadefinovaný symbol PHP_EOL na WZ?

Ja jsem zkousel nasledujici prikaz:
fwrite($fp,PHP_EOL);

a ve vyslednem textaku nemam novy radek ale retezec "PHP_EOL" a tudiz mi potom spravne nefunguje cteni z toho souboru

$line = fgets( $fp, 255);

Mimochodem nevite jaky je prikaz na precteni radku do konce souboru tzv. bez uvedeni max. poctu precetenych znaku?
An alternate reading function is fgets(). This is a bit different in how it reads, however. It reads a single line a time. You can specify length as well. The function terminates reading on three possibilities: end of line (EOL) is found (this is the \n character, ASCII code 10), the length has been met, or end of file (EOF) has been met. Default length is 1024 bytes.
Here are some examples of reading from a file:
$read = fread($fp, 1024); // Read 1024 bytes from the file pointer
$read = fgets($fp, 2048); // Read up to 2048 bytes, unless EOL or EOF is found.

PHP_EOL = "\r\n"

Since lines must be separated by \n on Unix and \r\n on Windows, it might be useful to use the PHP_EOL constant which contains the correct value on either platform.

Tak tam přímo dávej "\r\n" nebo "\n". Na Linuxu by mělo stačit "\n"

Proč nefunguje konstanta PHP_EOL - nevím.