Bonjour à tous,

Je développe mon site web sous MAC OS X et j'ai un problème à l'affichage d'un texte provenant d'un fichier.
Pour faire simple j'ai créer un code de 20 ligne qui affiche le texte d'un fichier :
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
23
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
  <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
<?php
$TestAccents = "Un texte comprtant des accent : é è à<br />"; 
echo $TestAccents;//--->Les accents s'affiche comme il faut
 
 
$FichierTexte = fopen('test.txt', 'r+');
 
$ligne = fgets($FichierTexte);
 
echo $ligne;// ecrit ce que contient mon fichier texte, les accent s'afffiche comme ceci : �
 
fclose($FichierTexte);
?>
  	</head>
  </body>
</html>
Pouvez-vous m'aider à résoudre ce problème ??