如何将HighCharts图像保存到PHP中的项目文件夹中? [英] How can I save HighCharts image into the project folder in PHP?

查看:142
本文介绍了如何将HighCharts图像保存到PHP中的项目文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用highcharts来显示一些结果,但是我需要将图表保存为jpg图像到项目文件夹中发送电子邮件。

Im using highcharts to display some results, but i need to save the chart as an jpg image into the project folder to email it.

有一种方法可以保存图像而不涉及浏览器的下载,只需将其保存到目标文件夹。
Thanks。

There is a way to save the image without involve the "download" of the browser, just save it to a destinated folder. Thanks.

推荐答案

如果您按照这里(我使用Java + phantomJS设置)。然后,您可以通过命令行发送json来构建图表和输出类型(jpeg,pdf等),然后您可以将此输出重定向到您选择的文件夹。您无法通过网络自动执行此操作,因为代码不知道您要存储图像的文件夹的路径。有关详情,请参阅 here

If you create your own export server like what is described here (I use the Java + phantomJS setup). You can then send via the command line the json to build the chart and the output type (jpeg, pdf, etc) and then you can redirect this output to a folder of your choice. You cannot do this from the web automagically as the code does not know your path to the folder you want to store the image in. For that see here.

这篇关于如何将HighCharts图像保存到PHP中的项目文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆