你好我的问题是这样的:
ReferenceError: Can't find variable: $
phantomjs://webpage.evaluate():7 in loadScript
phantomjs://webpage.evaluate():55
phantomjs://webpage.evaluate():153
phantomjs://webpage.evaluate():153
ERROR: the options variable was not available, contains the infile an syntax error? see{ xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6,
148.5, 216.4, 194.1, 95.6, 54.4] }] };
Converted img name : D:/graph_.png
为什么我会收到此错误?“找不到变量:$”
在 highcharts-convert.js 中,我将配置值更改为文件的正确路径。
HIGHCHARTS: 'D:\highcharts.js',
HIGHCHARTS_MORE: 'D:\highcharts-more.js',
HIGHCHARTS_DATA: 'D:\data.js',
JQUERY: 'D:\jquery.1.9.1.min.js',
我从 php 开始:
$type="Chart";
# Set file location.
$targetfile = "D:/test.js";
$prog = "D:/phantomjs.exe";
$progHc = "D:/highcharts-convert.js";
$callback = "D:/callback.js";
$outfile = "D:/graph_.png";
$result_flag = shell_exec( $prog . " " . $progHc . " -infile " . $targetfile . " -outfile " . $outfile . " -constr " . $type . " -callback " . $callback);