- Timestamp:
- Dec 4, 2010, 9:06:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PHP_Optimisateur/plugins/create_folders_alpha.php
r7991 r7994 13 13 if ($file != '.' && $file != '..' && !is_dir($DIRsource.'/'.$file)) { 14 14 // Récupère le parties du nom servant à créer les dossiers 15 preg_match('#(.{1})([0-9A-Za-z.-]*)_(.*)#', $file, $matches);15 if (preg_match('#(.{1})([0-9A-Za-z.-]*)_(.*)#', $file, $matches)) { 16 16 17 // Crée les dossier 18 if (!file_exists($DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2])) { 19 mkdir($DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2], 0777, true); 17 // Crée les dossier 18 if (!file_exists($DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2])) { 19 mkdir($DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2], 0777, true); 20 } 21 22 // Déplace le fichier 23 rename($DIRsource.$file, $DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2].'/'.$file); 20 24 } 21 22 // Déplace le fichier23 rename($DIRsource.$file, $DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2].'/'.$file);24 25 } 25 26 }
Note: See TracChangeset
for help on using the changeset viewer.