http://www.aditus.nu/jpgraph/
http://a-wei.net/archives/86
http://tech.ddvip.com/2008-10/122449461080346.html

[Mac]
# cd /usr/lib/php
# ln -sf JPGRAPHPATH/src jpgraph
# vi /usr/local/php5/lib/php.ini => include_path = ".:/usr/lib/php/jpgraph"
# /usr/sbin/apachectl restart

# cd /Library/WebServer/Documents
# mkdir jpgraph
# cd jpgraph
# cp -r JPGRAPHPATH/src .
# cp -r JPGRAPHPATH/docportal .

http://localhost/jpgraph/src/Examples/testsuit.php
http://localhost/jpgraph/docs/index.html

For instance,
include ("/Library/WebServer/Documents/jpgraph/src/jpgraph.php");
include ("/Library/WebServer/Documents/jpgraph/src/jpgraph_bar.php");

[Ubuntu]
# cd /usr/lib/php5
# ln -sf JPGRAPHPATH/src jpgraph
# vi /etc/php5/apache2/php.ini => include_path = ".:/usr/share/php:/usr/lib/php5/jpgraph"
# /etc/init.d/apache2 restart
# cd /var/www
# mkdir jpgraph
# cd jpgraph
# ln -sf JPGRAPHPATH/src/Examples .
# ln -sf JPGRAPHPATH/docs .

http://localhost/jpgraph/Examples/testsuit.php
http://localhost/jpgraph/docs/index.html

For instance,
include ("jpgraph.php");
include ("jpgraph_bar.php");

JpGraph Error
Font file "/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf" is not readable or does not exist.
# sudo apt-get install msttcorefonts
# sudo vim JPGRAPHPATH/src/jpg-config.inc.php
DEFINE("TTF_DIR","/usr/share/fonts/truetype/msttcorefonts/");
# /etc/init.d/apache2 restart

REFERENCES:
http://www.binnendijk.net/jpgraph/index.php
arrow
arrow
    全站熱搜

    wenching520 發表在 痞客邦 留言(0) 人氣()