Writing to filesystem from within phantomjs sandboxed environment
问题 I need to traverse forms on a site and save intermediate results to files. I'm using phantomjs' page.evaluate , but I'm having trouble accessing the filesystem from within page.evaluate 's sandboxed environment. I have something like this: for (var i = 0; i<option1.length; i++){ for (var ii = 0; ii<option2.length; ii++){ for (var iii = 0; iii<option3.length; iii++){ ... //I found what I want to save fs.write("someFileName", someData); } } } Obviously, I don't have access to nodejs' fs from