Skip to content

Commit

Permalink
Merge pull request firesunCN#15 from hyjk555/patch-2
Browse files Browse the repository at this point in the history
Update mail.php
  • Loading branch information
firesunCN authored May 30, 2018
2 parents 36d8924 + dae89e8 commit e9cb6de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function send_mail($xss_record_json) {
$subject = "GET:" . count($xss_record_json['get_data']) . "个 POST:" . count($xss_record_json['post_data']) . "个 Cookie:" . count($xss_record_json['cookie_data']) . "";

$body = json_encode($xss_record_json, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
if (!isset($body))$body=json_encode($xss_record_json); //如果PHP 版本低于5.4会不支持json_encode上面的参数.会初始化内容失败.导致无法发送邮件
$body = str_replace("\n", "<br/>", $body);
$body = str_replace(" ", "&nbsp;", $body);

Expand Down Expand Up @@ -37,4 +38,4 @@ function send_mail($xss_record_json) {

$mail->Body = $body;
$mail->Send();
}
}

0 comments on commit e9cb6de

Please sign in to comment.