1

こんにちは私の問題はこれです:

    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);
4

1 に答える 1