Probléme de Mémoire dans un tableau
Bonjour
Je test un petit script qui gère des gros fichier texte (contient jusqu’à un million de ligne ).
quant je travail avec un fichier de test qui contient 20 ligne le script marche très bien mais quant je load un gros fichier sa me donne cette erreur
Code:
1 2
|
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in C:\wamp\www\test\index.php on line 44 |
La ligne 44 contient sa
Code:
1 2 3 4 5 6 7 8 9 10
|
$fichier="test.txt";
$tabfich=file($fichier);
$tab = Array();
for( $i = 0 ; $i < count($tabfich) ; $i++ )
$tab[$i]=$tabfich[$i];
$tabD = array_unique($tab);//La ligne 44 |
Cordialement