JS文件中
const fs = require("fs");
console.log("开始进入文件读取..");

//同步的写入
var data = fs.readFileSync("./public/1.html");

console.log("文件读取完成");
console.log(data);//返回二进制数组
console.log(data.toString()); //返回标签内容
//同步的写入


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-01
  • 2021-06-19
  • 2021-09-20
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案