用 PHP 写只有一行代码的文本计数器
时间:2008-01-11 来源:061107
?php
file_put_contents($fileName,file_exist($fileName)?1:
(file_get_contents($fileName)+1));
?>
?php
echo sprintf(($a=@file_get_contents('/tmp/counter.txt')+1),
file_put_contents('/tmp/counter.txt', $a));
?>
?php
($a=@file_get_contents('/tmp/counter.txt')+1) | file_put_contents('/
tmp/counter.txt',$a) | print($a);
?>
相关阅读 更多 +
排行榜 更多 +