English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP md5_file() Function Usage and Example

PHP String String Function Manual

md5_file() function is used to calculate the MD of the specified file5 Hash Value.

Syntax

string md5

Definition and Usage

Used to calculate the md for a given file5 Hash Value

Return Value

Returns a string if successful; returns false if failed

Parameter

NumberParameters and Description
1

filename

Filename

2

raw_output

If set to TRUE, the message digest will be returned in the original 16 Returns in binary format.

Online Example

Try the following example to calculate the md for txt files5Hash Value

<?php
   //Calculate md for txt files5Hash Value
   $input = "Md5.txt";
   $md5file = md5_file($input);
   
   echo $md5file;
?>

PHP String String Function Manual