【发布时间】:2013-04-17 22:35:30
【问题描述】:
我在 linux web 服务器上使用以下代码
$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>';
我浏览了this 链接,但那里没有列出该代码。知道这个退出代码代表什么吗?
【问题讨论】:
-
这是你完整的
table1.js吗? -
是的,这就是完整的 javascript 代码。没有任何东西高于或低于它。