file - PHP Create New Folder Dynamically After Thousand Images In Folder -
I want to dynamically create a new folder for images, when there are 1000 images in a directory, PHP, To achieve the object? :) Thanks
To calculate the number of files in a folder, let me see you on this.
Then you will use the function to create a new directory.
Then you'll have something like this:
$ directory = 'images'; $ Files = globe ($ directory. '* .jpg'); If ($ files! == incorrect) {$ filecount = count ($ files); If ($ filecount> = 1000) {MKD ('images_2'); }}
Comments
Post a Comment