My code generates graph from SQL and I am using phpgraphlib for generating the graph. Is there a way to save this graph as a image to a specific location on a server?
Thanks in advance.
My code generates graph from SQL and I am using phpgraphlib for generating the graph. Is there a way to save this graph as a image to a specific location on a server?
Thanks in advance.
I've never used it, but looking at the documentation:
Constructor
PHPGraphLib ( int $width, int $height, [string $filename] )
...
If you specify the optional filename argument, PHPGraphLib will not display to the screen, but instead create a .png file in the same directory as the script where PHPGraphLib is being called.
So, create your graph with the relevant $filename
in the constructor and it should save there when you call ->createGraph()
.