成长值: 249 签到天数: 4708 天 [LV.Master]伴坛终老
|
发表于 2018/6/15 18:23
|
显示全部楼层
|阅读模式
|Google Chrome 67.0.3396.87 |Windows 10
在src HttpCore.cpp文件下 send_error方法定义status后面。加//展示自定义错误页面路径 - kangle.pw
string kangleErrorPaths = "/vhs/kangle/error/" + code + ".html";
char *kangleErrorPath=(char*)kangleErrorPaths.data();
ifstream infile;
char buf[1024];
infile.open(kangleErrorPath);
if(infile.is_open()){
while(infile.good() && !infile.eof()){
memset(buf,0,1024);
infile.getline(buf,1204);
s << buf;
}
infile.close();
return send_http(rq, obj, code, &s);
}
没测过,自己看源代码,以前黑色小河也弄过
关联:http://bbs.itzmx.com/thread-11426-1-1.html
|
|