摘要:
var http = require("http"); var fs = require("fs"); var url = require("url"); var path = require("path"); var server = http.createServer(function(req,res){ //这里如果不用req.url来if判断,那么用户不管输入什么网址, ... 阅读全文
摘要:
var http = require("http"); var url = require("url"); var fs = require("fs"); var path = require("path"); http.createServer(function(req,res){ //得到用户的路径 var pathname = url.parse(req.url).p... 阅读全文
摘要:
异步变同步读取 阅读全文
摘要:
var http = require("http"); var fs = require("fs"); var server = http.createServer(function(req,res){ //不处理小图标 if(req.url == "/favicon.ico"){ return; } //stat检测状态 fs.stat... 阅读全文
摘要:
var http = require("http"); var fs = require("fs"); var server = http.createServer(function(req,res){ //不处理小图标 if(req.url == "/favicon.ico"){ return; } fs.mkdir("./album/aaa"... 阅读全文
摘要:
var http = require("http"); var fs = require("fs"); var server = http.createServer(function(req,res){ //不处理小图标 if(req.url == "/favicon.ico"){ return; } //给用户加一个五位数的id var... 阅读全文
摘要:
var http = require("http"); var server = http.createServer(function(req,res){ //得到url var userurl = req.url; res.writeHead(200,{"Content-Type":"text/html;charset=UTF8"}) //substr函... 阅读全文
摘要:
路由 http模块 URL模块解析参数 阅读全文