Comment afficher un text apres image PHP
Résolu
atout1
Messages postés
216
Date d'inscription
Statut
Membre
Dernière intervention
-
atout1 Messages postés 216 Date d'inscription Statut Membre Dernière intervention -
atout1 Messages postés 216 Date d'inscription Statut Membre Dernière intervention -
Bonjour, tt le monde
en fait, je veux afficher une image dans une page php, tout marche bien mais le problème est que au dessous de cette image je veux afficher des donnees. mais une fois je mis header('Content-Type: image/png');
j'arrive que à afficher l'image, et tout les echo apres ca ne marche pas !!!! quelqu'un a une idée comment faire ??? Merci d'avance pour votre aide
Bonne journée
en fait, je veux afficher une image dans une page php, tout marche bien mais le problème est que au dessous de cette image je veux afficher des donnees. mais une fois je mis header('Content-Type: image/png');
j'arrive que à afficher l'image, et tout les echo apres ca ne marche pas !!!! quelqu'un a une idée comment faire ??? Merci d'avance pour votre aide
Bonne journée
A voir également:
- Comment afficher un text apres image PHP
- Image iso - Guide
- Extraire texte d'une image - Guide
- Acronis true image - Télécharger - Sauvegarde
- Reduire taille image - Guide
- Légender une image - Guide
4 réponses
Tu peux pas afficher ton image avec une simple balise img??
atout1
Messages postés
216
Date d'inscription
Statut
Membre
Dernière intervention
non, en fait moi je génère l'image car elle n'existe pas
Breub62
Messages postés
2989
Date d'inscription
Statut
Membre
Dernière intervention
369
Tu peux afficher du code pour y voir un peu plus clair?
voila le code, j'utilise Artichow, le librairie graphique pour PHP.
<?php
require_once('Artichow/Pie.class.php');
function makePie($values, $legend, $title, $x, $y)
{
$pie = new Pie($values, Pie::EARTH);
$pie->title->set($title);
$pie->title->setFont(new TuffyItalic(12));
$pie->title->move(0, -4);
$pie->setLabelPosition(-40);
$pie->setLabelMinimum(3);
$pie->label->setFont(new Tuffy(8));
$pie->label->setBackgroundColor(new White(10));
$pie->label->setPadding(2, 2, 2, 2);
$pie->setCenter($x, $y);
$pie->setSize(.45, .45);
$pie->setBorderColor(new Black());
if (is_array($legend)) {
$pie->setLegend($legend);
}
else {
$pie->legend->hide();
}
return $pie;
}
);
$graph = new Graph(500, 500);
$graph->setAntiAliasing(TRUE);
$pie = makePie(array(824, 432, 362), NULL, 'Ble tendre', .25, .23);
$graph->add($pie);
$pie = makePie(array(0, 0, 16), NULL, 'Ble dur', .75, .23);
$graph->add($pie);
$pie = makePie(array(6, 18, 2), NULL, 'Riz', .25, .67);
$graph->add($pie);
$pie = makePie(
array(22, 34, 15),
array('Morphologique', 'Mecanique', 'Biochimie',),
'Riz(5416)',
.7,
.7
);
$pie->legend->setModel(Legend::MODEL_BOTTOM);
$pie->legend->setPosition(-.08, 1);
$graph->add($pie);
$graph->draw();
// le pb est ici echo ne marche pas
echo "toto";
?>
<?php
require_once('Artichow/Pie.class.php');
function makePie($values, $legend, $title, $x, $y)
{
$pie = new Pie($values, Pie::EARTH);
$pie->title->set($title);
$pie->title->setFont(new TuffyItalic(12));
$pie->title->move(0, -4);
$pie->setLabelPosition(-40);
$pie->setLabelMinimum(3);
$pie->label->setFont(new Tuffy(8));
$pie->label->setBackgroundColor(new White(10));
$pie->label->setPadding(2, 2, 2, 2);
$pie->setCenter($x, $y);
$pie->setSize(.45, .45);
$pie->setBorderColor(new Black());
if (is_array($legend)) {
$pie->setLegend($legend);
}
else {
$pie->legend->hide();
}
return $pie;
}
);
$graph = new Graph(500, 500);
$graph->setAntiAliasing(TRUE);
$pie = makePie(array(824, 432, 362), NULL, 'Ble tendre', .25, .23);
$graph->add($pie);
$pie = makePie(array(0, 0, 16), NULL, 'Ble dur', .75, .23);
$graph->add($pie);
$pie = makePie(array(6, 18, 2), NULL, 'Riz', .25, .67);
$graph->add($pie);
$pie = makePie(
array(22, 34, 15),
array('Morphologique', 'Mecanique', 'Biochimie',),
'Riz(5416)',
.7,
.7
);
$pie->legend->setModel(Legend::MODEL_BOTTOM);
$pie->legend->setPosition(-.08, 1);
$graph->add($pie);
$graph->draw();
// le pb est ici echo ne marche pas
echo "toto";
?>