Já Vánoce juchuchuoslavím na Lopuchu!Lopuch.cz
$fp = fopen("/tmp/lock.txt", "r+"); if (flock($fp, LOCK_EX)) { // do an exclusive lock ftruncate($fp, 0); // truncate file fwrite($fp, "Write something here\n"); fclose($fp); /// tohel tu mema byt flock($fp, LOCK_UN); // release the lock } /// ma to by zde //fclose($fp);
<?php header("Content-type: image/jpeg"); $soub="mys.gif"; $handle = fopen ($soub, "r"); $contents = fread ($handle, filesize ($soub)); fclose ($handle); echo $contents ?>