Home >Backend Development >PHP Tutorial >thinkphp怎么在日志中记录post和return内容?

thinkphp怎么在日志中记录post和return内容?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:31:031564browse

请问各位大神。thinkphp怎么在日志中记录接收到的POST的内容以及对应的return的内容?

回复内容:

请问各位大神。thinkphp怎么在日志中记录接收到的POST的内容以及对应的return的内容?

已解决 自己把POST的内容 file put进日志文件就可以了 不过记录return的话 一定要在return前

3.1以前:
记录日志方式:Log::record('测试调试错误信息', Log::DEBUG);
官方文档地址:http://doc.thinkphp.cn/manual/log_record.html

3.2:
记录日志方式:\Think\Log::record('测试日志信息');
官方文档地址:http://document.thinkphp.cn/manual_3_2.html#log

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn