IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

HTML Discussion :

Encodage charset xHTML [Encodage]


Sujet :

HTML

  1. #1
    Membre confirmé
    Homme Profil pro
    Technicien chez Free
    Inscrit en
    Septembre 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Technicien chez Free
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Septembre 2011
    Messages : 65
    Par défaut Encodage charset xHTML
    Bonjour,

    Voila j'utilise un script JavaScript de lightbox [VOIR].

    Dans les pages ouverte avec les lightbox, il y a du html.

    J'ai un petit problème avec l'encodage.

    Aucun caractères spécieux et les accents ne s'affichent dans les lightbox.

    Alors que sur les page simple, tout marchent bien.

    Voici mon charset :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <meta content="text/html; charset=ISO-8859-15" http-equiv="Content-Type" />
    Pouvez vous m'aider SVP ??

  2. #2
    Modérateur

    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    12 577
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 12 577
    Par défaut
    URL du site ?
    N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  3. #3
    Membre confirmé
    Homme Profil pro
    Technicien chez Free
    Inscrit en
    Septembre 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Technicien chez Free
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Septembre 2011
    Messages : 65
    Par défaut
    Voici l'url du site.

    http://www.mdl-champollion.fr/

    Pour le teste : cliquer sur le logo

  4. #4
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 198
    Par défaut
    Bonjour,
    vérifies l'encodage dans ton fichier texte.php

  5. #5
    Membre confirmé
    Homme Profil pro
    Technicien chez Free
    Inscrit en
    Septembre 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Technicien chez Free
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Septembre 2011
    Messages : 65
    Par défaut
    Enfaite il n'y à pas d'encodage :s

    Voici le fichier :

    Le texte est afficher en Ligne 25
    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
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
     
    <?php 
    session_start(); 
                    function time_p($iTime) { $iTimeDifference = time() - $iTime ; if( $iTimeDifference<0 ) { return; } $iSeconds = $iTimeDifference ; $iMinutes = round( $iTimeDifference/60 ); $iHours = round( $iTimeDifference/3600 ); $iDays = round( $iTimeDifference/86400 ); $iWeeks = round( $iTimeDifference/604800 ); $iMonths = round( $iTimeDifference/2419200 ); $iYears = round( $iTimeDifference/29030400 ); if( $iSeconds<60 ) return 'Il y a ' . $iSeconds . ' seconde' . ( $iSeconds>1 ? 's' : '' ); elseif( $iMinutes<60 ) return 'Il y a ' . $iMinutes . ' minute' . ( $iMinutes>1 ? 's' : '' ); elseif( $iHours<24 ) return 'Il y a ' . $iHours . ' heure' . ( $iHours>1 ? 's' : '' ); elseif( $iDays<2 ) return 'Hier a '.date(H.':'.i,$iTime); else return 'le '.date(d.'/'.m.'/'.Y.' \a '.H.':'.i,$iTime); }
    $id_texte = $_GET['id_texte']; 
    $id_user = $_GET['id_membre']; 
    require_once('../script/config.php'); 
    mysql_connect("$nom_du_serveur","$nom_utilisateur","$passe"); mysql_select_db("$nom_de_la_base"); 
    $select_all_user = mysql_query("SELECT * FROM membre WHERE id= $id_user"); 
    while($variable_all_user = mysql_fetch_array($select_all_user)) { 
    $select_photo_user = mysql_query("SELECT * FROM texte WHERE id= $id_texte"); 
    while($variable_photo_user = mysql_fetch_array($select_photo_user)) { $photo_titre =''; 
    if(!empty($variable_photo_user['titre'])) { $photo_titre = ' | '.$variable_photo_user['titre']; } ?>
     
    <div class="boxtitle">
      <div class="fleft">Texte de <?php echo $variable_all_user['nom'].$photo_titre;?> </div>
      <div class="fright boxclose" onClick="Lightbox.hide()"></div>
      <div class="clear"></div>
    </div>
    <div class="boxpad">
      <div class="mpad"> <b style="color:White; font-size:25px;">
        <h1 style="font-size:30px;"><?php echo $variable_photo_user['titre'];?></h1>
        </b> <br>
        <small><small><small><small><small><small><small><small><small><br>
        </small></small></small></small></small></small></small></small></small> <span style="font-size:14px; color:white;"> <?php echo nl2br($variable_photo_user['texte']);?></span><br>
        <br>
        <b><span style="text-align:right;color:white;">Ajouter <?php echo time_p($variable_photo_user['time']);?></span></b><br>
        <br>
      </div>
      <table style="text-align: left; width: 1px;" border="0" cellpadding="0" cellspacing="5">
          <tbody>
     
        <tr>
            <td>
          <?php $report = $_GET['report'];
                    if ($report == 'ok') {echo '<table style="border: 1px solid rgb(149, 164, 134); margin-left: auto; margin-right: auto; background-color: rgb(239, 245, 234); color: rgb(61, 102, 17); width: 1px;;" border="0" cellpadding="5" cellspacing="0"> <tbody> <tr> <td style="padding-left: 32px; padding-top: 32px; background-image: url(../img/button/ok.png); background-position: center; background-repeat: no-repeat;"></td> <td style="white-space: nowrap;"><b>Transmits aux moderateurs...</b></td> </tr> </tbody> </table><br>';} 
                    
                    ?>
          <?php if(isset($_SESSION['login'])) {  ?>
          <table
     style="width: 100%; text-align: left;"
     border="0" cellpadding="0" cellspacing="0">
              <tbody>
     
            <tr><td>
              <table
     style="width: 1px; text-align: left;"
     border="0" cellpadding="0" cellspacing="0">
                <tbody>
                  <tr>
                    <td class="rounded-r10-top-left" style="background-image: url(../img/trans/1.png); white-space: nowrap; font-weight: bold; text-align: center;"><big><big>
                      <?php $id455 = $_SESSION['id'];
    $id_s22s22s = $variable_photo_user['id'];
    $selec_kiff = mysql_query("SELECT * FROM kiff WHERE id_content = $id_s22s22s && id_membre= $id455 && type= 'texte'"); 
     
    if (mysql_num_rows($selec_kiff)<1) { ?>
                      <a onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\'';?>);Profile.kiff('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte');"style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte-left">Je Kiff</a></big></big></td>
                    <?php } else { ?>
                    <a onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\'';?>);Profile.kiffnone('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte'); "style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte-left">Je Kiff Plus</a>
                      </big>
                      </big>
                  </td>
     
                <?php }
    $selec_kiffpas = mysql_query("SELECT * FROM kiffpas WHERE id_content = $id_s22s22s && id_membre= $id455 && type= 'texte'"); 
    if (mysql_num_rows($selec_kiffpas)<1) { ?>
     
                  <td  style="background-image: url(../img/trans/1.png);white-space: nowrap; font-weight: bold; text-align: center;"><big><big> <a onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\'';?>);Profile.kiffpas('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte'); " style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte" >Je Kiff Pas</a></big></big></td>
                  <?php } else { ?>
                  <td  style="background-image: url(../img/trans/1.png);white-space: nowrap; font-weight: bold; text-align: center;"><big><big> <a onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\'';?>);Profile.kiffpasnone('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte'); " style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte" >Enlever</a></big></big></td>
                  <?php } ?>
                  <td class="rounded-r10-top-right"style="background-image: url(../img/trans/1.png);white-space: nowrap; font-weight: bold; text-align: center;"><big><big> <a style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte-right" onclick="Profile.ocomenterfeed('<?php echo $variable_photo_user['id'];?>','texte');">Commenter</a></big></big></td>
                </tr>
                  </tbody>
     
              </table>
              </td>
     
     
              <td><div style="margin-left;5px;">
                <table
     style="margin-left:auto;margin-right:0px;width: 1px; text-align: left;"
     border="0" cellpadding="0" cellspacing="0">
                  <tbody>
                    <tr>
                      <td class="rounded-r10-top-right rounded-r10-top-left" style="background-image: url(../img/trans/1.png);white-space: nowrap; font-weight: bold; text-align: center;"><big><big> <a style="color:#cccccc;padding:5px 10px;border:0px;font-size:10px;" class="menu-compte-right-left" onclick="Profile.ocomrep('<?php echo $variable_photo_user['id'];?>','texte');">Signaler</a></big></big></td>
                    </tr>
                  </tbody>
                </table></td>
            </tr>  </tbody>
          </table>
          <?php } ?>
          <div id="boxcomrep_<?php echo $variable_photo_user['id'];?>_texte" style="display: none; width: 300px; position: absolute; margin-top:-92px; margin-left:-21px;">
            <div class="clear"></div>
            <div class="minibox">
              <div class="center small-txt bold">Es-tu sur de vouloir reporter un abus ? </div>
              <div class="spadtop center"> <span class="input-bleu2">
                <input class="button-bleu2" onclick="Lightbox.M2('<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'&report=ok\'';?>);Profile.comrep('<?php echo $variable_photo_user['id'];?>','<?php echo $_SESSION['id'];?>','texte')" value="Signaler" type="button">
                </span> <span class="input-gris">
                <input class="button-gris" onclick="Profile.ocomrep('<?php echo $variable_photo_user['id'];?>','texte');" value="Annuler" type="button">
                </span> </div>
            </div>
            <div class="fright tip2"></div>
          </div>
          <div class="clear"> </div>
          <table class="rounded-r3-bottom" style="background-image: url(../img/trans/1.png); text-align: left; width: 100%;" border="0" cellpadding="5" cellspacing="5">
            <tbody>
              <tr>
                <td colspan="1" rowspan="2" style="vertical-align: top;"><?php 
                                                                    $id_photo_membre = $variable_all_user['avatar']; 
                                                                    $h654564t = mysql_query("SELECT * FROM img WHERE id= $id_photo_membre"); 
                                                                    while($rr54g567r = mysql_fetch_array($h654564t)) { 
                                                                    $source = 'http://'.$_SERVER['HTTP_HOST'].'/img/photo/h/'.$rr54g567r[url].'.jpg'; 
                                                                    $size= getimagesize($source); $w = $size[0]; $h = $size[1]; if ($w/$h >= 2) { $w_size = 'width: 100px;'; 
                                                                    $h_size = ''; } elseif ($w/$h > 1.2 && $w/$h < 2) { $w_size = ''; $h_size = 'height: 110px;'; } 
                                                                    else { $w_size = ''; $h_size = 'height: 180px;'; } 
                                                                    echo ' <img style="'.$h_size.$w_size.'  padding:5px; background-color: white;" class="avatar" src="http://'.$_SERVER['HTTP_HOST'].'/img/photo/h/'.$rr54g567r[url].'.jpg" />'; } ?></td>
                  </td>
                <td style="vertical-align: top;"><table>
                    <tbody>
                      <tr>
                        <td><big><big><big><big><big><b style="color: white;"><?php echo $variable_all_user['nom']; ?></b></big></big></big></big></big></td>
                      </tr>
                      <tr>
                        <td style="white-space: nowrap;"><big><big><b style="color: white;">
                          <?php $select_all_photo_user = mysql_query("SELECT * FROM texte WHERE id_membre= $id_user"); 
                                                      $nbr_photo = mysql_num_rows($select_all_photo_user); echo $nbr_photo;?>
                          Texte</b></big></big></td>
                      </tr>
                      <tr>
                        <td style="text-align: center;"><?php if(isset($_SESSION['login'])) {  ?>
                          <div style="margin-top: 10px;"><big><big><b><a class="album_photo" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/profile.php?id=<?php echo $variable_all_user['id']; ?>&page=texte">Voir
                            Tous</a></b></big></big></div>
                          <?php } ?></td>
                      </tr>
                    </tbody>
                  </table></td>
              </tr>
            </tbody>
          </table>
          <table text-align: left; width: 100%;" border="0" cellpadding="5" cellspacing="0">
            <tbody>
              <tr>
                <td><?php  ?></td>
              </tr>
            </tbody>
          </table>
            </td>
          <td style="vertical-align: top;"><?php 
                    
                    echo '<table style="color:white;margin-left:auto;margin-right:auto;text-align: left; width: 335px;" border="0" cellpadding="5" cellspacing="0"><tbody>';
    $select_texte1 = mysql_query("SELECT * FROM texte WHERE id_membre = $id_user ORDER by id DESC"); 
    while($v_texte = mysql_fetch_array($select_texte1)) {
    $titre = $v_texte['titre'];
    $texte = $v_texte['texte'];
    $time = $v_texte['time'];
     
    $max_caracteres=150;
    if (strlen($texte)>$max_caracteres)
    {
    $texte = substr($texte, 0, $max_caracteres);
    $position_espace = strrpos($texte, " ");    
    $texte = substr($texte, 0, $position_espace);    
    $texte = $texte."...";
    }
    echo '
    <tr>
    <td
    style="font-size:15px;vertical-align:top;white-space: nowrap;"><b>
    '; if(isset($_SESSION['login'])) { echo '<a onclick="Lightbox.M2(\'http://'.$_SERVER['HTTP_HOST'].'/ajax/texte.php?id_texte='.$id_texte.'&id_membre='.$id_membre.'\')">'; } echo $titre.'</a></b></td>
    <td style="vertical-align:midle;color:grey;white-space: nowrap; text-align:right;">'.time_p($time).'</td>
    </tr>
    <tr><td colspan="2" rowspan="1" style="color:white;vertical-align:top;">'.$texte.'</td>
    </tr>
     
    <tr><td colspan="2" rowspan="1"
    style="border-bottom:1px solid grey;"></td></tr>';
    }
    echo '</tbody></table>'; ?></td>
        </tr>
          </tbody>
     
      </table>
    </div>
    <?php } }?>
    Je vois pas trop comment attribué un ancodage a un dive ou même a une balise qui n'est pas <html>

  6. #6
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 198
    Par défaut
    je ne suis pas un spécialiste du PHP mais à lire ceci Encodage des caractères

  7. #7
    Membre confirmé
    Homme Profil pro
    Technicien chez Free
    Inscrit en
    Septembre 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Technicien chez Free
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Septembre 2011
    Messages : 65
    Par défaut
    Ok c'est bon J'ai trouvé

    Merci

  8. #8
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 198
    Par défaut
    le petit plus serait de donner ta solution, penses à ceux qui seront dans ton même cas et à qui tu épargneras de longues et fastidieuses heures d'insomnie.

  9. #9
    Membre confirmé
    Homme Profil pro
    Technicien chez Free
    Inscrit en
    Septembre 2011
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Technicien chez Free
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Septembre 2011
    Messages : 65
    Par défaut
    A oui pardon ^^

    Alors tout simplement utiliser la fonction PHP ""htmlentities();""

    Cette fonction permet de remplacer les caractères spéciaux "é, à ..." en code html.

    Il convertit tout ces caractères :

    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
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    Array
    (
        [ ] => &nbsp;
        [¡] => &iexcl;
        [¢] => &cent;
        [£] => &pound;
        [¤] => &curren;
        [¥] => &yen;
     
        [¦] => &brvbar;
        [§] => &sect;
        [¨] => &uml;
        [©] => &copy;
        [ª] => &ordf;
        [«] => &laquo;
     
        [¬] => &not;[*] => *
        [®] => &reg;
        [¯] => &macr;
        [°] => &deg;
        [±] => &plusmn;
     
        [²] => &sup2;
        [³] => &sup3;
        [´] => &acute;
        [µ] => &micro;
        [¶] => &para;
        [·] => &middot;
     
        [¸] => &cedil;
        [¹] => &sup1;
        [º] => &ordm;
        [»] => &raquo;
        [¼] => &frac14;
        [½] => &frac12;
     
        [¾] => &frac34;
        [¿] => &iquest;
        [À] => &Agrave;
        [Á] => &Aacute;
        [Â] => &Acirc;
        [Ã] => &Atilde;
     
        [Ä] => &Auml;
        [Å] => &Aring;
        [Æ] => &AElig;
        [Ç] => &Ccedil;
        [È] => &Egrave;
        [É] => &Eacute;
     
        [Ê] => &Ecirc;
        [Ë] => &Euml;
        [Ì] => &Igrave;
        [Í] => &Iacute;
        [Î] => &Icirc;
        [Ï] => &Iuml;
     
        [Ð] => &ETH;
        [Ñ] => &Ntilde;
        [Ò] => &Ograve;
        [Ó] => &Oacute;
        [Ô] => &Ocirc;
        [Õ] => &Otilde;
     
        [Ö] => &Ouml;
        [×] => &times;
        [Ø] => &Oslash;
        [Ù] => &Ugrave;
        [Ú] => &Uacute;
        [Û] => &Ucirc;
     
        [Ü] => &Uuml;
        [Ý] => &Yacute;
        [Þ] => &THORN;
        [ß] => &szlig;
        [à] => &agrave;
        [á] => &aacute;
     
        [â] => &acirc;
        [ã] => &atilde;
        [ä] => &auml;
        [å] => &aring;
        [æ] => &aelig;
        [ç] => &ccedil;
     
        [è] => &egrave;
        [é] => &eacute;
        [ê] => &ecirc;
        [ë] => &euml;
        [ì] => &igrave;
        [í] => &iacute;
     
        [î] => &icirc;
        [ï] => &iuml;
        [ð] => &eth;
        [ñ] => &ntilde;
        [ò] => &ograve;
        [ó] => &oacute;
     
        [ô] => &ocirc;
        [õ] => &otilde;
        [ö] => &ouml;
        [÷] => &divide;
        [ø] => &oslash;
        [ù] => &ugrave;
     
        [ú] => &uacute;
        [û] => &ucirc;
        [ü] => &uuml;
        [ý] => &yacute;
        [þ] => &thorn;
        [ÿ] => &yuml;
     
        ["] => &quot;
        ['] => '
        [<] => &lt;
        [>] => &gt;
        [&] => &amp;
     
    )
    A utiliser comme ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    <?php 
    $texte = 'Il y à un petit chien qui dors & qui est > que le chat.';
    echo htmlentities($texte);
    ?>
    La page va alors exécuté:

    Il y &agrave un petit chien qui dors &amp qui est &gt que le chat.

    ET donc afficher : Il y à un petit chien qui dors & qui est > que le chat.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. amfphp - problème d'encodage/charset - bug?
    Par MigsFR dans le forum Flex
    Réponses: 1
    Dernier message: 26/03/2012, 15h13
  2. Webbrowser encodage charset
    Par mathrb dans le forum VB.NET
    Réponses: 2
    Dernier message: 23/12/2009, 13h03
  3. Encodage charset
    Par KaptainouK dans le forum Balisage (X)HTML et validation W3C
    Réponses: 8
    Dernier message: 22/09/2005, 14h16
  4. [Encodage] Charset et console Dos
    Par ToYonos dans le forum API standards et tierces
    Réponses: 3
    Dernier message: 01/02/2005, 12h10

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo