上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 38 下一页
摘要: 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判断,那么用户不管输入什么网址, ... 阅读全文
posted @ 2017-11-01 22:17 Erick-LONG 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2017-11-01 08:21 Erick-LONG 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 异步变同步读取 阅读全文
posted @ 2017-11-01 08:05 Erick-LONG 阅读(1229) 评论(0) 推荐(0) 编辑
摘要: var http = require("http"); var fs = require("fs"); var server = http.createServer(function(req,res){ //不处理小图标 if(req.url == "/favicon.ico"){ return; } //stat检测状态 fs.stat... 阅读全文
posted @ 2017-11-01 08:04 Erick-LONG 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 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"... 阅读全文
posted @ 2017-11-01 08:02 Erick-LONG 阅读(1299) 评论(0) 推荐(0) 编辑
摘要: var http = require("http"); var fs = require("fs"); var server = http.createServer(function(req,res){ //不处理小图标 if(req.url == "/favicon.ico"){ return; } //给用户加一个五位数的id var... 阅读全文
posted @ 2017-11-01 08:01 Erick-LONG 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 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函... 阅读全文
posted @ 2017-11-01 07:59 Erick-LONG 阅读(1420) 评论(0) 推荐(0) 编辑
摘要: 路由 http模块 URL模块解析参数 阅读全文
posted @ 2017-11-01 07:58 Erick-LONG 阅读(186) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" ) func main() { a := [...]int{1, 3, 6, 4, 8, 0, 6} fmt.Println(a) num := len(a) for i := 0; i < num; i++ { for j := i + 1; j < num; j++ { ... 阅读全文
posted @ 2017-10-31 22:39 Erick-LONG 阅读(215) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" ) func main() { LABLE1: for { for i := 0; i 3 { break LABLE1 } } } fmt.Println("ok") } 阅读全文
posted @ 2017-10-31 22:13 Erick-LONG 阅读(148) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 38 下一页