Home >> PHP >> fopen() function in PHP

fopen() function in PHP

The fopen() function is used to open a file returning a file handle associated with the open file. It can take two or three arguments.file name mode, and the optional use include - path.

Example

$fp=fopen("data.txt","r");

if(!fp) die("Can not open the file");

Post Your Comment

Next Questions
fclose() function
fread() function
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

Copyright ©2022 coderraj.com. All Rights Reserved.