**phantom stderr: execvp(): Too many levels of symbolic links**
var phantom=require('phantom');
exports.testPhantomCreatePage=function(beforeExit,assert) {
phantom.create(function(err,ph) {
ph.createPage(function(page){
page.open("http://www.google.com",function(status){
console.log("opened google? ",status);
});
var result=page.evaluate(function(){
return document.title;
});
console.log(result);
});
ph.exit();
});
};
有木有出现这种情况的???后台只有上面的一句话
6 回复
Try this
var phantom = require('phantom');
var testPhantomCreatePage = exports.testPhantomCreatePage = function(beforeExit, assert) {
phantom.create(function(ph) {
ph.createPage(function(page){
page.open("http://www.google.com",function(status) {
console.log("opened google? ",status);
page.evaluate((function(){
return document.title;
}), function(result) {
console.log(result);
ph.exit();
});
});
});
});
};
testPhantomCreatePage();
@fyddaben 感覺是你的exec PATH有問題
參考一下這篇:
http://stackoverflow.com/questions/7027740/makefile-and-symbolic-links