2014-01-17 13 views

回答

0

你在一個地方的範圍和reqres可用,所以就這樣結束它和輸出重定向頭

if (results.length > 0) { 
    results.forEach(function (key) { 
     if (key.password != userParsed.password) { 
      res.writeHead(301, { 
       'Location': 'your/path/file.html' 
      }); 
      res.end(); 
     } else { 
      console.log(key.password); 
     } 
    }); 
} 
+0

嗨,我試了一下..但沒用,頁面沒有重定向。 – Bubble

相關問題