session_start();会导致flock失败?
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --><?php session_start(); $file = "temp.txt"; $fp = fopen($file , 'w'); if(flock($fp , LOCK_EX | LOCK_NB)){ sleep(10); echo 'a'; flock($fp , LOCK_UN); } else{ echo "Lock file failed...\n"; } fclose($fp);