标签:bsp asc 技术分享 输出 ocs div read http tps
path
<string> | <Buffer> | <URL> | <integer> 文件名或文件描述符。options
<Object> | <string>
callback
<Function>
demo
02.js
var fs=require("fs"); fs.readFile(‘test.txt‘,function (err,data) { if (err ) { console.log("读取失败") } else { //输出test.txt的内容 console.log(data.toString()); } });
test.txt
how are you
you are good
输出结果:
标签:bsp asc 技术分享 输出 ocs div read http tps
原文地址:http://www.cnblogs.com/guangzhou11/p/7788198.html