将URL参数添加到Hostgator上的PHP错误日志中

将URL参数添加到Hostgator上的PHP错误日志中

问题描述:

I've got a PHP error_log which return a few MySQL-errors, but in order to replicate and fix those, I need to be able to see which parameters were passed to the page. I have tried to find this using both the PHP error_log file and the Apache logs from my Hostgator hosting, but cannot work out which one belongs to which, as the times don't seem to match up. Is there a way to store the URL with parameters in the error_log, or is there a better way to do this?

Many thanks, Ron

我有一个PHP error_log,它返回一些MySQL错误,但为了复制和修复它们, 我需要能够看到哪些参数传递给页面。 我试图使用PHP error_log文件和我的Hostgator托管的Apache日志找到这个,但无法确定哪个属于哪个,因为时间似乎不匹配。 有没有办法在error_log中存储带参数的URL,或者有更好的方法吗? p>

非常感谢, Ron p> div>

have a look at using:

error_log($url);
error_log($param1);

You should be able to push to the log any data you wish