Problème ISO par meta

Fermé
hack_net Messages postés 783 Date d'inscription lundi 5 mars 2007 Statut Membre Dernière intervention 5 juin 2014 - 3 févr. 2009 à 21:08
hack_net Messages postés 783 Date d'inscription lundi 5 mars 2007 Statut Membre Dernière intervention 5 juin 2014 - 15 févr. 2009 à 11:31
Bonjour,

Voila. Je fais actuellement un site (jusqu'a là, pas de problem). Mon site se découpe ainsi :
Racine du site : fichiers principaux
Dossier include : mon header et mon bas
Dossier images : mes images

Le code de index.php est le suivant :
<?php
include "include/header.inc";
?>
			<div id="principal">
				<h1>Titre1</h1>
				<p>Paragraphe... Blablablablablabla</p>
			</div>
<?php
include "include/bas.inc";
?>


Dans mon header, il y a ceci la balise meta ISO pour convertir les accents automatiquement.

Le problème sont que les accents ne passe pas. Jai fait plusieurs recherche sur le net, et on m'a dit d'afficher :
header("Content-Type:text/html; charset=iso-8859-15");
dans mon entête.

Mon index.php est donc maintenant ainsi :

<?php
include "include/header.inc";
header("Content-Type:text/html; charset=iso-8859-15");
?>
			<div id="principal">
				<h1>Titre1</h1>
				<p>Paragraphe... Blablablablablabla</p>
			</div>
<?php
include "include/bas.inc";
?>


Mais le message d'erreur suivant s'affiche :

Warning: Cannot modify header information - headers already sent by (output started at /mnt/102/sdb/f/b/h4ck.n3t/include/header.inc:7) in /mnt/102/sdb/f/b/h4ck.n3t/index.php on line 3


Comment faire ?

Merci d'avance...
A voir également:

9 réponses

tokaido6 Messages postés 85 Date d'inscription mardi 20 mai 2008 Statut Membre Dernière intervention 15 juillet 2012 2
3 févr. 2009 à 21:15
Salut
Que contient la page header.inc
0
hack_net Messages postés 783 Date d'inscription lundi 5 mars 2007 Statut Membre Dernière intervention 5 juin 2014 51
3 févr. 2009 à 22:01
Maintenant elle contient ceci :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">

<head>

	<title>.: Bienvenue sur boxonware :: Webradio, Torrent, Streaming, Logiciels :.</title>

	<link rel="stylesheet" type="text/css" href="css/style.css" media="all">

	<link rel="stylesheet" type="text/css" href="css/structure.css" media="screen">
	<script type="text/javascript">
	 function montre(id) {
	 var d = document.getElementById(id);
		if(d.style.display == 'block') { d.style.display = 'none'; } else {
			for (var i = 1; i<=15; i++) {
				if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
			}
			if (d) {d.style.display='block';}
		}
	 }
	</script>
</head>
<body>

<div id="global">

	<div id="entete"><a href="/"></a><p class="sous-titre">.: Bienvenue sur boxonware :: Webradio, Torrent, Streaming, Logiciels :.</p></div>

	<div id="centre">

			<div id="navigation">
				<h2>NAVIGATION</h2>
					<ul>
						<li><a href="index.php?act=news">Accueil</a></li>
						<li><h3>.:Radio</h3></li>
						<li><a href="index.php?act=ecoute">Nous écouter</a></li>
						<li><a href="index.php?act=programme">Programme</a></li>
						<li><h3>.:Streaming</h3></li>
						<li><a href="index.php.act=streaming">Tous les films</a></li>
						<li><a href="#" onclick="javascript:montre('smenu1'); return false">Par catégorie</a>
							<div class="sousmenu" id="smenu1" style="display: none;">
								<ul>
									<li><a href="index.php?act=aventure">Aventure</a></li>
									<li><a href="index.php?act=action">Action</a></li>
									<li><a href="index.php?act=bio">Biographies</a></li>
									<li><a href="index.php?act=comedies">Comédies</a></li>
									<li><a href="index.php?act=com-drame">Comédies dramatiques</a></li>
									<li><a href="index.php?act=musicales">Comédies musicales</a></li>
									<li><a href="index.php?act=annimes">Dessins animés</a></li>
									<li><a href="index.php?act=doc">Documentaires</a></li>
									<li><a href="index.php?act=drames">Drames</a></li>
									<li><a href="index.php?act=fantastique">Fantastiques</a></li>
									<li><a href="index.php?act=film-anim">Films d'animation</a></li>
									<li><a href="index.php?act=histo">Films historiques</a></li>
									<li><a href="index.php?act=horreur">Horreur-Thrillers</a></li>
									<li><a href="index.php?act=sf">Science-Fictions</a></li>
									<li><a href="index.php?act=western">Westerns</a></li>
								</ul>
							</div></li>
						<li><a href="#" onclick="javascript:montre('smenu2'); return false">Par ordre alphabétique</a>
								<div class="sousmenu" id="smenu2" style="display: none;">
								<ul>
									<li><a href="index.php?act=0-9">0-9</a></li>
									<li><a href="index.php?act=a-b">A-B</a></li>
									<li><a href="index.php?act=c-d">C-D</a></li>
									<li><a href="index.php?act=e-f">E-F</a></li>
									<li><a href="index.php?act=g-h">G-H</a></li>
									<li><a href="index.php?act=i-j">I-J</a></li>
									<li><a href="index.php?act=k-l">K-L</a></li>
									<li><a href="index.php?act=m-n">M-N</a></li>
									<li><a href="index.php?act=o-p">O-P</a></li>
									<li><a href="index.php?act=q-r">Q-R</a></li>
									<li><a href="index.php?act=s-t">S-T</a></li>
									<li><a href="index.php?act=u-v">U-V</a></li>
									<li><a href="index.php?act=w-x">W-X</a></li>
									<li><a href="index.php?act=y-z">Y-Z</a></li>
								</ul>
								</div></li>
						<li><h3>.:Torrent</h3></li>
						<li><a href="index.php?act=mmt">Méta moteur torrent</a></li>
						<li><a href="index.php?act=top10">Top 10</a></li>
						<li><h3>.:Logiciel</h3></li>
						<li><a href="index.php?act=mml">Méta moteur logiciel</a></li>
						<li><a href="index.php?act=indisp">Les indispenssables</a></li>
						<li><h3>.:Boxonware</h3></li>
						<li><a href="/forum/" target="_blank"> Le Forum</a></li>
						<li><a href="index.php?act=staff">Staff</a></li>
						<li><a href="index.php?act=contact">Contact</a></li>
					</ul>
			</div>


Bref rien pour les caractères....

J'ai esseyé avec et sans balise meta, même résultat...
0
tokaido6 Messages postés 85 Date d'inscription mardi 20 mai 2008 Statut Membre Dernière intervention 15 juillet 2012 2
3 févr. 2009 à 22:08
C'est normail ton erreur

<?php
include "include/header.inc";
//Ici tu mets une page contenant une entête

header("Content-Type:text/html; charset=iso-8859-15");
 // Et ici tu modifies l'entête 

?>
<div id="principal">
<h1>Titre1</h1>
<p>Paragraphe... Blablablablablabla</p>
</div>
<?php
include "include/bas.inc";
?>

Warning: Cannot modify header information - headers already sent by (output started at /mnt/102/sdb/f/b/h4ck.n3t/include/header.inc:7) in /mnt/102/sdb/f/b/h4ck.n3t/index.php on line 3

Tu ne peux pas modifier l'entête de ta page enlève une entête.
0
hack_net Messages postés 783 Date d'inscription lundi 5 mars 2007 Statut Membre Dernière intervention 5 juin 2014 51
3 févr. 2009 à 22:12
Je n'ai pas tout compris.... Peux-tu me r-expliqué s'il te plait ?
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
tokaido6 Messages postés 85 Date d'inscription mardi 20 mai 2008 Statut Membre Dernière intervention 15 juillet 2012 2
3 févr. 2009 à 22:19
En gros enlève ça dans index.php "header("Content-Type:text/html; charset=iso-8859-15");" et mets plutôt dans header.inc puisque c'est la page "header.inc" qui contient la balise "html"
0
hack_net Messages postés 783 Date d'inscription lundi 5 mars 2007 Statut Membre Dernière intervention 5 juin 2014 51
4 févr. 2009 à 15:27
Je viens de faire ça....

En effet le message d'erreure a disparut, mais les accents sont toujours incompris ! Voici mon header.inc maintenant :

<?php header("Content-Type:text/html; charset=iso-8859-15"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">

<head>

	<title>.: Bienvenue sur boxonware :: Webradio, Torrent, Streaming, Logiciels :.</title>

	<link rel="stylesheet" type="text/css" href="css/style.css" media="all">

	<link rel="stylesheet" type="text/css" href="css/structure.css" media="screen">
	<script type="text/javascript">
	 function montre(id) {
	 var d = document.getElementById(id);
		if(d.style.display == 'block') { d.style.display = 'none'; } else {
			for (var i = 1; i<=15; i++) {
				if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
			}
			if (d) {d.style.display='block';}
		}
	 }
	</script>
</head>
<body>

<div id="global">

	<div id="entete"><a href="/"></a><p class="sous-titre">.: Bienvenue sur boxonware :: Webradio, Torrent, Streaming, Logiciels :.</p></div>

	<div id="centre">

			<div id="navigation">
				<h2>NAVIGATION</h2>
					<ul>
						<li><a href="index.php?act=news">Accueil</a></li>
						<li><h3>.:Radio</h3></li>
						<li><a href="index.php?act=ecoute">Nous écouter</a></li>
						<li><a href="index.php?act=programme">Programme</a></li>
						<li><h3>.:Streaming</h3></li>
						<li><a href="index.php.act=streaming">Tous les films</a></li>
						<li><a href="#" onclick="javascript:montre('smenu1'); return false">Par catégorie</a>
							<div class="sousmenu" id="smenu1" style="display: none;">
								<ul>
									<li><a href="index.php?act=aventure">Aventure</a></li>
									<li><a href="index.php?act=action">Action</a></li>
									<li><a href="index.php?act=bio">Biographies</a></li>
									<li><a href="index.php?act=comedies">Comédies</a></li>
									<li><a href="index.php?act=com-drame">Comédies dramatiques</a></li>
									<li><a href="index.php?act=musicales">Comédies musicales</a></li>
									<li><a href="index.php?act=annimes">Dessins animés</a></li>
									<li><a href="index.php?act=doc">Documentaires</a></li>
									<li><a href="index.php?act=drames">Drames</a></li>
									<li><a href="index.php?act=fantastique">Fantastiques</a></li>
									<li><a href="index.php?act=film-anim">Films d'animation</a></li>
									<li><a href="index.php?act=histo">Films historiques</a></li>
									<li><a href="index.php?act=horreur">Horreur-Thrillers</a></li>
									<li><a href="index.php?act=sf">Science-Fictions</a></li>
									<li><a href="index.php?act=western">Westerns</a></li>
								</ul>
							</div></li>
						<li><a href="#" onclick="javascript:montre('smenu2'); return false">Par ordre alphabétique</a>
								<div class="sousmenu" id="smenu2" style="display: none;">
								<ul>
									<li><a href="index.php?act=0-9">0-9</a></li>
									<li><a href="index.php?act=a-b">A-B</a></li>
									<li><a href="index.php?act=c-d">C-D</a></li>
									<li><a href="index.php?act=e-f">E-F</a></li>
									<li><a href="index.php?act=g-h">G-H</a></li>
									<li><a href="index.php?act=i-j">I-J</a></li>
									<li><a href="index.php?act=k-l">K-L</a></li>
									<li><a href="index.php?act=m-n">M-N</a></li>
									<li><a href="index.php?act=o-p">O-P</a></li>
									<li><a href="index.php?act=q-r">Q-R</a></li>
									<li><a href="index.php?act=s-t">S-T</a></li>
									<li><a href="index.php?act=u-v">U-V</a></li>
									<li><a href="index.php?act=w-x">W-X</a></li>
									<li><a href="index.php?act=y-z">Y-Z</a></li>
								</ul>
								</div></li>
						<li><h3>.:Torrent</h3></li>
						<li><a href="index.php?act=mmt">Méta moteur torrent</a></li>
						<li><a href="index.php?act=top10">Top 10</a></li>
						<li><h3>.:Logiciel</h3></li>
						<li><a href="index.php?act=mml">Méta moteur logiciel</a></li>
						<li><a href="index.php?act=indisp">Les indispenssables</a></li>
						<li><h3>.:Boxonware</h3></li>
						<li><a href="/forum/" target="_blank"> Le Forum</a></li>
						<li><a href="index.php?act=staff">Staff</a></li>
						<li><a href="index.php?act=contact">Contact</a></li>
					</ul>
			</div>


Help !
0
tokaido6 Messages postés 85 Date d'inscription mardi 20 mai 2008 Statut Membre Dernière intervention 15 juillet 2012 2
4 févr. 2009 à 20:27
Enlève çà
 <?php header("Content-Type:text/html; charset=iso-8859-15"); ?>
et mets plutôt ceci
 <meta http-equiv="content-type" content="text/html;  charset=iso-8859-1" /> 
dans ton "<head>"
0
hack_net Messages postés 783 Date d'inscription lundi 5 mars 2007 Statut Membre Dernière intervention 5 juin 2014 51
4 févr. 2009 à 20:31
Si je me suis embété a faire des recherches sur google pour trouver ça "" tu pense bien que j'ai déjà esseyé le coup du meta ! Ca ne marche pas !!!!!

Sinon, je n'aurais même pas posté ! Mais merci quand même pour ta réponse ;)

Une solution ?
0
hack_net Messages postés 783 Date d'inscription lundi 5 mars 2007 Statut Membre Dernière intervention 5 juin 2014 51
15 févr. 2009 à 11:31
UP :)

Toujours personne ?
0