如req.flash(‘success’, ‘注册成功’);这种情况怎么解决
@i5ting 另外问一个问题,报如下这种错误是什么原因导致的?
Error: Can’t set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:346:11) at ServerResponse.header (d:\chat\nodejs\nodejsdb\node_modules\express\lib\response.js:718:10) at ServerResponse.send (d:\chat\nodejs\nodejsdb\node_modules\express\lib\response.js:163:12) at done (d:\chat\nodejs\nodejsdb\node_modules\express\lib\response.js:957:10) at Object.exports.renderFile (d:\chat\nodejs\nodejsdb\node_modules\jade\lib\index.js:374:12) at View.exports.__express [as engine] (d:\chat\nodejs\nodejsdb\node_modules\jade\lib\index.js:417:11) at View.render (d:\chat\nodejs\nodejsdb\node_modules\express\lib\view.js:126:8) at tryRender (d:\chat\nodejs\nodejsdb\node_modules\express\lib\application.js:639:10) at EventEmitter.render (d:\chat\nodejs\nodejsdb\node_modules\express\lib\application.js:591:3) at ServerResponse.render (d:\chat\nodejs\nodejsdb\node_modules\express\lib\response.js:961:7) at d:\chat\nodejs\nodejsdb\app.js:112:7 at Layer.handle_error (d:\chat\nodejs\nodejsdb\node_modules\express\lib\router\layer.js:71:5) at trim_prefix (d:\chat\nodejs\nodejsdb\node_modules\express\lib\router\index.js:310:13) at d:\chat\nodejs\nodejsdb\node_modules\express\lib\router\index.js:280:7 at Function.process_params (d:\chat\nodejs\nodejsdb\node_modules\express\lib\router\index.js:330:12) at IncomingMessage.next (d:\chat\nodejs\nodejsdb\node_modules\express\lib\router\index.js:271:10)