PHP traverses the directory, generates the md5 value of each file in the directory and writes it to the result file

巴扎黑
Release: 2023-03-03 22:24:01
Original
1192 people have browsed it

php 遍历目录,生成目录下每个文件的md5值并写入到结果文件中

实例代码:

 array("';
    $content .= $fileSize;
    $content .= '","';
    $content .= $fileMd5;
    $content .= '"),';
    $content .= "\n";
      
    if (! fwrite ( $fileHandle, $content )) {
      print ($filePath . " can not be written!") ;
    }
  }
    
  /**
   * 在manifes文件中写入头信息
   *
   * @param unknown $fileHandle     
   */
  public static function writeMaifestHeader($fileHandle) {
    $header = "
Copy after login

   


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!