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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -