ru //实行文件操作 //文件写入 //1.加载文件操作,fs模块 var fs = require('fs'); //2.实现文件写入操作 var msg='Hello world'; //调用fs.writeFile() 进行文件写入 fs.writeFile('./hello.text',msg,'utf8',function(err){ //如果err=null,表示文件使用成功,否则,表示希尔文件失败 if(err) console.log('写文件出错了,错误是:'+err); e