Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1614 connectés 

  FORUM HardWare.fr
  Programmation
  XML/XSL

  probléme d'insertion de caractères accentués dans un xml via php

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

probléme d'insertion de caractères accentués dans un xml via php

n°1937362
pp1807
Posté le 03-11-2009 à 18:49:25  profilanswer
 

bonjour je voudrait modifier un fichier XML via un script php mon problème est le suivant si je récupère un accent et que je l'écrit dans mon fichier XML l'accent ne ressort pas et j'ai à la place des caractères genre rectangle etc.
 
voici mon script php :
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>creacat</title>
</head>
<?php
 
$file = $_FILES['fichier']['name'] ;
$galery=$_POST['cat'];
$width=$_POST['largeur'];
$height=$_POST['hauteur'];
echo $galery;
 
if (isset($_FILES['fichier']) AND $_FILES['fichier']['error'] == 0)
{
   move_uploaded_file($_FILES['fichier']['tmp_name'], '../images/' . basename($_FILES['fichier']['name']));
   echo "L'envoi a bien été effectué !";
 
}
 
$texte='<image>
   <url>images/'.$file.'</url>
   <caption><![CDATA[<font size="50"></font><br><u><a href="'.$galery.'   .php">'.$galery.'  </a></u> ]]></caption>
   <width>'.$width.'</width>
   <height>'.$height.'</height>
</image>'
;
$fichier=fopen("../gallery.xml","r+" );
$lire=fgets($fichier);
while($lire)
{
  $lire=fgets($fichier);
};
fputs($fichier,$texte);
fclose($fichier);
 
?>
</body>
</html>
 
et mon XML :
 
<?xml version="1.0" encoding="iso-8859-1"?>
<gallery frameColor="0xFFFFFF" frameWidth="15" imagePadding="20" displayTime="6" enableRightClickOpen="true">
<image>
   <url>images/Beautee.jpg</url>
   <caption><![CDATA[<font size="50"></font><br><u><a href="http://www.google.fr">Beauté</a></u> ]]></caption>
   <width>465</width>
   <height>698</height>
</image>
<image>
   <url>images/Portrait.jpg</url>
   <caption><![CDATA[<font size="50"></font><br><u><a href="http://www.google.fr">Portrait</a></u> ]]></caption>
   <width>465</width>
   <height>700</height>
</image>
<image>
   <url>images/Mode.jpg</url>
   <caption><![CDATA[<font size="50"></font><br><u><a href="http://www.google.fr">Mode</a></u> ]]></caption>
   <width>465</width>
   <height>700</height>
</image>
<image>
   <url>images/as.JPG</url>
   <caption><![CDATA[<font size="50"></font><br><u><a href="beaute.php">beaute</a></u> ]]></caption>
   <width>465</width>
   <height>700</height>
</image><image>
   <url>images/</url>
   <caption><![CDATA[<font size="50"></font><br><u><a href="ᡠꪩ   .php">ᡠꪩ  </a></u> ]]></caption>
   <width>465</width>
   <height>465</height>
</image><image>
   <url>images/</url>
   <caption><![CDATA[<font size="50"></font><br><u><a href="蠡aᡠ� .php">蠡aᡠ�</a></u> ]]></caption>
   <width>700</width>
   <height>465</height>
</image><image>
   <url>images/</url>
   <caption><![CDATA[<font size="50"></font><br><u><a href="蠡aᡠ� .php">蠡aᡠ�</a></u> ]]></caption>
   <width>700</width>
   <height>465</height>
</image>
 
 
Merci d'avance

mood
Publicité
Posté le 03-11-2009 à 18:49:25  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  XML/XSL

  probléme d'insertion de caractères accentués dans un xml via php

 

Sujets relatifs
Problème placement JButtonproblème affichage sous IE
Texte dynamique + masque = probleme[Offset] problème
Problème lecture vidéo flash Firefox[VBA-E] Problème pour macro collage spécial
Problème actionPerformed(ActionEvent e)Problème avec répétitiion du On error Goto xx
probleme liens dreamweaver mozilla[RESOLU] Probleme couleur PC et MAC en HTML!! HELP PLZ :)
Plus de sujets relatifs à : probléme d'insertion de caractères accentués dans un xml via php


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR