$t1 = microtime(true); //程序过程 $t2 = microtime(true); file_put_contents("a.txt", "耗时".round($t2-$t1,3)."秒\r\n",FILE_APPEND);