How to use Filesystem fread in PHP

In this article I am going to explain about fread function in PHP.
  • 1207

PHP fread() Function

The filesystem fread function is used to read an open file.

Syntax of fread function

fread(file, length)

Parameters in fread function

It have two parameter:

Parameter Description
file It specifies the open file to write.
length It specifies the maximum number of bytes to read.

Example of filesystem fread function

<html>

<body>
 

<?php

$file = fopen("C:\wamp\www\Dinesh\Mcn.txt","r+");

fread($file,"25");

fclose($file);

?>
 

</body>

</html>


You may also want to read these related articles :
here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.