Node.js开发指南上
var fs = require('fs');
fs.readFile('file.txt', 'utf-8', functino(data){
if (err) {
console.error(err);
} else {
console.log(data);
}
});
console.log('end.');
运行的结果如下: end. Contents of the file. 而如果是同步的话fs.readFileSync,就会是 Contents of the file. end. -----------------------------分隔线--------------------------------- 我得到的结果却是: Contents of the file. end. -----------------------------分隔线--------------------------------- 是版本更新了才变成这样,还是?求解?