我在
linux Web服务器上使用以下代码
原文链接:https://www.f2er.com/php/138876.html$error = exec('phantomjs table1.js',$op,$code); echo $code; // prints 11 on screen
table1.js
var page = require('webpage').create(); var url = 'table1.PHP'; page.open(url,function (status) { page.render('ss/table1.png'); phantom.exit(); });
table1.PHP
echo '<h1>This should be converted to an image</h1>';