I am creating a medium size application.
This application consists of a lot of products.
Now these products have many images (one product can have 5 - 6 imag
Try this:
if (!file_exists('path/to/directory')) { mkdir('path/to/directory', 0777, true); }
1) Does this automaticly create a new folder if it doesnt already exist. => file_exists and mkdir
2) how can i give permission to a newly created folder so that i avoid this problem => 0777