admin管理员组文章数量:1332353
I have set up debugging, and using error_log("message");
works fine everywhere I have used it so far, except within an AJAX handler.
How does one log to the error handler within an AJAX handler?
E.g. The following is working and returning status 200, but not logging to the error log:
function my_action_handler() {
// These are never logged
error_log("my_action_handler was called"); //This is never logged
$a = $_POST['a'];
error_log("a:".$a);
wp_send_json_success();
die();
}
add_action( 'wp_ajax_my_action', 'my_action_handler' );
本文标签: ajaxerrorlog() not working within wpajaxaction handler
版权声明:本文标题:ajax - error_log() not working within wp_ajax_{action} handler 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742322296a2453031.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论