To do

<?php

$fp = fopen(“/tmp/lock.txt”, “w+”);

if (flock($fp, LOCK_EX)) { // do an exclusive lock
fwrite($fp, “Write something here\n”);
flock($fp, LOCK_UN); // release the lock
} else {
echo “Couldn’t lock the file !”;
}

fclose($fp);

?>

http://us3.php.net/flock


read – write Berkeley DB

Response handling in response.c

This entry was posted in Career and tagged , , . Bookmark the permalink.

4 Responses to To do

  1. Sasha says:

    Yêu cầu không post mấy cái này lên, đọc chẳng hiểu gì cả :|

  2. chữ thì bé tí, theme thì xấu :D

  3. huongcc says:

    ko hiểu lắm :(

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>