ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-france
php-france
[php-france] utf decode
by Deny other posts by this author
Sep 23 2006 1:08AM messages near this date
[php-france] connecte : gethostbyaddr | [php-france] HS mysql update
bonjour :

mandriva 2006
PHP Version 5.0.4

j'ai cette erreur dans mon script :
PHP Fatal error:  Call to undefined function utf8_encode() in 
/home/deny/aide/rss.php on line 7


les librairies xml sont installéées


    libxml

libXML support 	active
libXML Version 	2.6.21
libXML streams 	enabled



et voici le bout de script avec l'erreur delimitée :

<?php
require('../config.php'); // Le fichier config doit exister ( include + 
puissant ) pour se connecter à MySQL
mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname);

function cleanText($intext) {
return utf8_encode(htmlspecialchars(stripslashes($intext)));} // On 
transformes tout les caractères spéciaux ou accents pour rende le xml 
valide /////////////ERREUR ICI

header("Content-Type: text/xml;charset=utf-8"); // pour dire que le 
document sera codé en RSS/XML


merci pour votre aide


-- 
Se désabonner ? Envoyez un mail à php-france-unsubscribe@[...].org
Plus d'informations ? Envoyez un mail à sympa@[...].org ayant pour sujet HELP

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved