Home >> PHP >> fread() function in PHP

fread() function in PHP

The fread() function used to reading and writing a file.

r - Open file for reading only the file position indicator is placed at the beginning of the file.

r+ -Open file for reading and writing the file position indicator is placed at the beginning of the file.

w - Open file for writing only. any exiting content will be lost.if the file does not exits,PHP attempts to create it.

w+ - Open file for reading and writing. any exiting content will be lost.if the file does not exits,PHP attempts to create it.

a - Open file for appending only. data is written to the end of an existing file. if the file does not exits ,PHP attempts to create it.

a+ - Open file for reading and appending data is written to the end of an existing file. if the file does not exits ,PHP attempts to create it.

Post Your Comment

Next Questions
create the file
Check the file is available or not
Destroy the file
Write into the file
Create into folder
Remove a folder
touch() function
file_exits() function
unlink() function
fwrite() function
mkdir() function
rmdir() function
is_dir() function
file_get_contents() function
fgets() function
basename() function
chgrp() function
chmod() function
chown() function
clearstatcache() function
copy() function
delete() function
dirname() function
disk_free_space() function
disk_total_space() function

Copyright ©2022 coderraj.com. All Rights Reserved.