bonjour à tous,
je suis sous PHP5 et j'ai une difficulté avec les tableaux. voici ma fonction :
echo "--($this->hashMd5[$i]) && ($this->monFichier[$i]) --";
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 var $nbFile; var $dossier; var $monFichier =array(); var $hashMd5=array(); var $Res=array(); var $connexion; $i =0; $files = glob("$this->dossier"); foreach ($files as $filename) { echo "| $filename <br /> |"; $this->monFichier[$i] = $this->removeslash($filename); $res = $this->md5Alreadyrun($this->monFichier[$i]); if($res){ //echo "$this->monFichier[$i] <br />"; $this->hashMd5[]= hash_file ('md5', $filename , FALSE ); echo "--($this->hashMd5[$i]) && ($this->monFichier[$i]) --"; $this->pushDB($this->hashMd5[$i],$this->monFichier[$i]); } $i++; }
remonte --(Array[18]) && (Array[18]) -- ça semble donc ne rien envoyer à mes autres fonctions.
En revanche, un print_r($this->hashMd5) et print_r($this->monFichier)
me remonte l'ensemble de mon tableau avec les données.
Sauriez vous svp me dire, pourquoi à l'intérieur de ma boucle, je n'arrive pas à accéder au contenu de mon tableau.
merci pour vos retours.
Partager