1

我正在使用 1.9.1 版本的 PhantomJS。并且还尝试使用 1.9.0 版本的 PhantomJS 和最新的 master 的全新版本。Phantom 不加载 css 并且状态为“失败”。我还尝试使用本地和其他服务器,如 apache。对于测试,我使用以下代码:

var page = require('webpage').create();

var cssUrl = 'http://31.31.201.139:8001/download/any.css';
var otherUrl = 'http://31.31.201.139:8001/download/any.other';

page.open(cssUrl, function (status) {
    console.log('css status', status)
    page.open(otherUrl, function (status) {
        console.log('other status', status)
        phantom.exit();
    });
});

我已经在不同的操作系统上启动了它,结果是一样的。

你能帮我解决这个问题吗?

4

0 回答 0