Home >> PHP >> touch() function in PHP

touch() function in PHP

The touch() function used to create the file.

Example

if(file_exits("abc.txt")){

      echo "file already exits";

}else{

     touch("abc.txt");

     echo "file has been created";

}

Post Your Comment

Next Questions
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
diskfreespace() function
feof() function
fflush() function
fgetc() function
fgetss() function
file_put_contents() function
fileatime() function

Copyright ©2022 coderraj.com. All Rights Reserved.