如题,十分感谢各位牛人来指教!!!小弟今天刚刚接触PHP,不知道这个功能到底是怎么回事

解决方案 »

  1.   

    private function WriteLog($filename,$log)
    {
    $handle = @fopen($filename,"a+");
    @fwrite($handle, date('Y-m-d H:i:s')." $log\n");
    @fclose($handle);
    }
      

  2.   

    file_put_contents() 函数把一个字符串写入文件中。
    与依次调用 fopen(),fwrite() 以及 fclose() 功能一样。
      

  3.   

    echo file_put_contents("test.txt","Hello World. Testing!");