//*=========================================================================* $type = strtolower(substr(strrchr($file,"."),1)); //*=========================================================================*
//*=========================================================================* function name_no_ext($fichier){ $fichier=basename($fichier,strrchr($fichier,'.')); // name_no_ext: return $fichier; } //*=========================================================================*
//*========================================================================= function add_zero($str,$number="2"){ while(strlen($str) < $number) $str = "0" . $str; return $str; } // ou // str_pad($input, $number, "0", STR_PAD_LEFT); //*=========================================================================
//*========================================================================= function delTree($dir) { $files = array_diff(scandir($dir), array('.','..')); foreach ($files as $file) { (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); } return rmdir($dir); } //*=========================================================================
//*========================================================================= function record_this_texte($thistexte,$MyName,$mode="w"){ // mode=w pour réduire existant à zéro! sinon mettre a $PATH_Fichier="$MyName"; $f = fopen("$PATH_Fichier", "$mode"); fputs($f, $thistexte); fclose($f); return; } //*=========================================================================
//*========================================================================= function mois_fr($mois_numerique){ $tabmonthC = Array("Janvier", "Février", "Mars", "Avril", "Mai", "Juin","Juillet", "Aout", "Septembre", "Octobre", "Novembre","Décembre"); $moisFRC = $tabmonthC[$mois_numerique-1]; return $moisFRC; } //*=========================================================================
**************************************************************************************************************