久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      實(shí)例講解node中http模塊和url模塊的使用方法

      一、http模塊

      const http = require('http') http.createServer(function(req,res) {     console.log(req.url) //獲取url里面攜帶的參數(shù)     res.writeHead(200,{'Content-type':"text/html;charset='utf-8'"}) //設(shè)置響應(yīng)頭     res.write("<head><meta charset='UTF-8'></head>") //設(shè)置編碼,不設(shè)置的話就會出現(xiàn)中文亂碼     res.write('this is node js中國加油') //給頁面響應(yīng)信息     res.end() //響應(yīng)結(jié)束}).listen(8081) //端口號
      當(dāng)我把url改為http://127.0.0.1:8081/aaa時(shí)候
      console.log(req.url)輸出的內(nèi)容

      實(shí)例講解node中http模塊和url模塊的使用方法

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號