The fopen() function is also used to create a file. Maybe a little confusing, but in PHP, a file is created using the same ...
www.w3schools.com