在Express3.0以后, 默认不支持layout.ejs。请使用如下方法启用layout.ejs
安装 express-partials
npm install express-partials
在app.js中,
var partials = require('express-partials');
app.set('view engine', 'ejs');
app.use(partials());
------------------
http://expressjs.com/guide.html
http://www.csser.com/board/4f77e6f996ca600f78000936#/post/4f77e772be3baa0d78001470