voila j'ai regardé sur plusieurs sites comment lire une valeur d'un fichier xml, mais j'ai du rater quelque chose...
Car j'ai l'erreur suivante :
voici le code utilisé :Warning: domxml_open_file(): I/O in e:\developpement\TOOLS\fonctionxml.php on line 39
Warning: domxml_open_file(): warning : in e:\developpement\TOOLS\fonctionxml.php on line 39
Warning: domxml_open_file(): failed to load external entity "contact.xml" in e:\developpement\TOOLS\fonctionxml.php on line 39
pour info, j'utilise PHP4.3
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 function lirenbchamp($FXML) { $FXML='contact.xml'; if ($dom=domxml_open_file($FXML)) { $calcX = xpath_new_context($dom); return xpath_eval("//contact/list/nbchamp/text()",$calcX); } else { exit('fichier '.$FXML.' non trouvé, veuillez contacter votre administrateur'); } }
merci d'avance








Répondre avec citation



Partager