问题描述
app=function(req,res){res.writeHead(200,{'Content-Type':'text/plain'})var 缓冲区=新缓冲区(100)var fs=require('fs')fs.open('.'+req.url,'r',function(err,fd){fs.fstat(fd,function(err, stats){变量 i=0var s=stats.sizeconsole.log('.'+req.url+' '+s)for(i=0;i
为什么这只会多次显示 979 字节文件中的最后 100 字节?
为什么 chrome 浏览器不显示任何输出?
gert@node:~/http$ node server.js获取 http://127.0.0.1:8000/appwsgi/www/index.htm./appwsgi/www/index.htm 9791002003004005006007008009001000vi/vi.htm">vi</a>编辑服务器上的在线文件.