98 |
- |
1 |
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
|
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>1.3. Next Step</title><link rel="stylesheet" type="text/css" href="phplotdoc.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="PHPlot Reference Manual" /><link rel="up" href="install.html" title="Chapter 1. PHPlot Installation" /><link rel="prev" href="install-install.html" title="1.2. Installing" /><link rel="next" href="starting.html" title="Chapter 2. Getting Started with PHPlot" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">1.3. Next Step</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="install-install.html">Prev</a> </td><th width="60%" align="center">Chapter 1. PHPlot Installation</th><td width="20%" align="right"> <a accesskey="n" href="starting.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="install-next"></a>1.3. Next Step</h2></div></div></div><p>
|
|
|
3 |
You can test PHPlot with any of the examples in <a class="xref" href="examples.html" title="Chapter 5. PHPlot Examples">Chapter 5, <em>PHPlot Examples</em></a>,
|
|
|
4 |
or by entering this minimal script into a file called (for example)
|
|
|
5 |
<code class="filename">plottest.php</code>.
|
|
|
6 |
</p><pre class="programlisting"><?php
|
|
|
7 |
require 'phplot.php';
|
|
|
8 |
$data = array(array('', 10), array('', 1));
|
|
|
9 |
$plot = new PHPlot();
|
|
|
10 |
$plot->SetDataValues($data);
|
|
|
11 |
$plot->SetTitle('First Test Plot');
|
|
|
12 |
$plot->DrawGraph();
|
|
|
13 |
</pre><p>
|
|
|
14 |
Access this script through your browser, and you should see a very simple
|
|
|
15 |
plot. Note: Since PHPlot returns image data, not text, you will generally
|
|
|
16 |
not see error messages in the output. If a script using PHPlot has a
|
|
|
17 |
syntax error, or calls an undefined function, you will get a blank page
|
|
|
18 |
returned, and you will probably have to check the web server error log
|
|
|
19 |
for the reason.
|
|
|
20 |
You might find that debugging your PHPlot applications is easier using
|
|
|
21 |
the PHP CLI (command line interface),
|
|
|
22 |
as described at the start of <a class="xref" href="examples.html" title="Chapter 5. PHPlot Examples">Chapter 5, <em>PHPlot Examples</em></a>.
|
|
|
23 |
</p><p>
|
|
|
24 |
If you are installing PHPlot for use by some web application (rather than
|
|
|
25 |
to develop your own applications), proceed with that application's setup
|
|
|
26 |
instructions. If you want to develop your own applications using PHPlot, you
|
|
|
27 |
can start by looking at some of the examples in <a class="xref" href="examples.html" title="Chapter 5. PHPlot Examples">Chapter 5, <em>PHPlot Examples</em></a>,
|
|
|
28 |
or go right to the introductory material in <a class="xref" href="starting.html" title="Chapter 2. Getting Started with PHPlot">Chapter 2, <em>Getting Started with PHPlot</em></a>.
|
|
|
29 |
Experienced programmers may want to skip right to <a class="xref" href="concepts.html" title="Chapter 3. PHPlot Concepts">Chapter 3, <em>PHPlot Concepts</em></a>
|
|
|
30 |
to learn about PHPlot concepts and features in depth.
|
|
|
31 |
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="install-install.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="install.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="starting.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.2. Installing </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Getting Started with PHPlot</td></tr></table></div></body></html>
|