var fs = require('fs');var file = fs.readFileSync(path, "utf8");console.log(file);//该片段来自于http://www.codesnippet.cn/detail/280120131957.html
来源: http://www.codesnippet.cn/detail/280120131957.html