Blame | Letzte Änderung | Log anzeigen | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1"><LINK REL="Start" HREF="index.html"><LINK REL="Contents" HREF="toc.html"><LINK REL="Prev" HREF="42HowtogenerateimageswithPHP.html"><LINK REL="Next" HREF="43UsingPHPdirectly.html"><STYLE TYPE="text/css"><!--BODY { font-family: serif }H1 { font-family: sans-serif }H2 { font-family: sans-serif }H3 { font-family: sans-serif }H4 { font-family: sans-serif }H5 { font-family: sans-serif }H6 { font-family: sans-serif }SUB { font-size: smaller }SUP { font-size: smaller }PRE { font-family: monospace }A { text-decoration: none }--></STYLE></HEAD><BODY><A HREF="toc.html">Contents</A><A HREF="42HowtogenerateimageswithPHP.html">Previous</A><A HREF="43UsingPHPdirectly.html">Next</A><HR NOSHADE><H3><A NAME="4_2_1">4.2.1 Using the JpGraph library to send back images</A></H3><P> To get access to the JpGraph library you will need to include atleast two files, the base library and one or more of the plotextensions. So for example to create a basic line plot the top of yourPHP file must have the lines:<DIV class="phpscript"><CODE><FONT color="#000000"><FONT color="#0000BB"> <BR></FONT><FONT color="#007700">include (</FONT><FONT color="#DD0000">'jpgraph.php'</FONT><FONT color="#007700">);<BR>include (</FONT><FONT color="#DD0000">'jpgraph_line.php'</FONT><FONT color="#007700">);<BR>...<BR> </FONT><FONT color="#FF8000">// Code that uses the jpgraph library<BR></FONT><FONT color="#007700">...</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P><P></P><P><DIV class="note"><B>Note:</B> You might also use the PHP directive<I>require</I>. The difference is subtle in that include will only includethe code if the include statement is actually executed. While require()will always be replaced by the file specified. See PHP documentationfor further explanation. For most practical purposes they areidentical.</DIV></P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="42HowtogenerateimageswithPHP.html">Previous</A><A HREF="43UsingPHPdirectly.html">Next</A></BODY></HTML>