I need to know if there is any way to create new folder if the path doesn\'t exist. When I try to fopen() a path, it says NO such File or Directory exists I tri
you can't use fopen to create folders.
To create a folder you have to use mkdir
for the operations you have to repeat every time, there is a language feature called "user-defined functions". Least known feature of PHP, as one can say judging by stackoverflow answers.