prepare($sql); if( !$stmt ) { exit('false'); } $stmt->bind_param('sii', $key, $time, $uid); $stmt->execute(); if( $stmt->affected_rows !== 1){ exit('Can not insert into the database'); } //发送邮件 require_once '../myFunc/clueReceipt.php'; if( isset($_SESSION['email']) && strlen($_SESSION['email'])>0 ) { $nameforsend = isset($_SESSION['realname'])? $_SESSION['realname']: '尊敬的用户'; if($type == 'fineReport') { $reqresult = send_mail($_SESSION['email'], 'zlwd',$subject='【帆软】这是关于FineReport的更多资料', ARRAY("%key%" => ARRAY($nameforsend))); } } echo 'true'; $stmt->free_result(); $conn->close();