用php读取PhantomJS输出

用php读取PhantomJS输出,php,phantomjs,Php,Phantomjs,我试图用PHP阅读PhantomJS中的一些输出,但我没有找到处理它的技巧。以前有人做过吗?有什么解决办法吗 var page = require('webpage').create(); page.open('http....', function(status) { if (status !== 'success') { console.log('Unable to access network'); } else { page.evalua

我试图用PHP阅读PhantomJS中的一些输出,但我没有找到处理它的技巧。以前有人做过吗?有什么解决办法吗

var page = require('webpage').create();
page.open('http....', function(status) {
    if (status !== 'success') {
        console.log('Unable to access network');
    } else {
         page.evaluate(function() {
            var list = document.querySelectorAll('div.resume');
            for (var i = 0; i < list.length; i++){
               console.log((i + 1) + ":" + list[i].innerText);
            }
         });
    }
    phantom.exit();
});

在shell中运行phantomjs命令时是否看到输出?这里看到的脚本不应该产生任何输出
$result = shell_exec($cmd...);
print($result);