LaTatadu91
Messages postés968Date d'inscriptionjeudi 20 mai 2004StatutMembreDernière intervention26 avril 20131 3 févr. 2006 à 15:53
j'ai trouver un paragraphe le voici:
<small>4.5 Alternatives to streaming back the image</small>
<small> If you like to save the image directly to a file instead of streaming
it back to the browser then you just have to specify an absolute
filename in the final call to Graph::Stroke(), i.e.
</small>
<small> Please note that the user running as Apache/PHP must have write
access to the specified directory.</small>
<small> There are also two predefined filenames which have special meaning.</small>
<li><small>"auto", This will create a file in the same directory as the script
with the same name as the script but with the correct image extension.</small></li><li><small>_IMG_HANDLER, (This is defined in jpgraph.php). Specifying this
filename will not create a an image to file or stram it back to the
browser. Instead it will instruct the Stroke() method to just return
the handle for the GD image. This is usefull if you later want to
manipulate the image in ways that are not yet supported by Jpgraph. For
example include the image in generated PDF files.
Example:
</small>
<small>
$handle = $graph->Stroke(_IMG_HANDLER);
</small>
</li>
mais je suis pas sur que ca aide mon niveau d'anglais est en train de sombrer
ben là lol.
Au lieu de faire $graph->stroke (); (je suppose)
tu fais $graph -> stroke (nomfichier);
Et, comme dans mon script, faut penser à effacer le fichier quand tu entres dans le traitement. Mais si ça ne fonctionne pas, il faut créer un nom de fichier aléatoire (faut faire gaffe au cache du navigateur en fait, qui, s'il ne voiit pas de chan,gement dans le html;, risque de réafficher ce qu'il avait en cache, DONC le graph précédent).
malalam
Messages postés10839Date d'inscriptionlundi 24 février 2003StatutMembreDernière intervention 2 mars 201025 3 févr. 2006 à 16:54
Ben oui regarde mon script, je les efface chaque fois de manière à n'en avoir qu'un à la fois.
M%ais c'est aussi l'inconvénient : on crée des fichiers et on les efface, sans arrêt.
Si cx'est en local ou sur un intranet, ça va...si c'est pour du web, ça le fait moins.