我试图使用Node将数据附加到日志(log)文件中.js,这很好,但不会进入下一行.\n
在我下面的函数中似乎不起作用.有什么建议吗?
function processInput ( text )
{
fs.open('H://log.txt', 'a', 666, function( e, id ) {
fs.write( id, text + "\n", null, 'utf8', function(){
fs.close(id, function(){
console.log('file is updated');
});
});
});
}