本文整理汇总了PHP中text::MakeClean方法的典型用法代码示例。如果您正苦于以下问题:PHP text::MakeClean方法的具体用法?PHP text::MakeClean怎么用?PHP text::MakeClean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类text
的用法示例。
在下文中一共展示了text::MakeClean方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: text
$ets_outter->main_title = $config->get('site_name') . ": " . $l['title-acp-massmail'];
$ets_outter->page_title = $l['title-acp-massmail'];
include_once 'system/nlb_mail.class.php';
$mail = new nlb_mail($db);
$text = new text($_POST, array('subject', 'message'));
if (!$mail->Active) {
// can't send emails!
$ets->page_body = $l['acp-mail-disabled'];
} else {
$baddata = false;
if (!empty($_POST)) {
$text->validate();
if ($text->is_missing_required) {
$baddata = true;
} else {
$text->MakeClean('trim', 'slash_if_needed');
$c = $text->clean;
$message = stripslashes($c['message']);
$subject = stripslashes($c['subject']);
$mail->SMTPKeepAlive = true;
// in case we are using smtp,
// will improve performance
// get all the user names...
$names = $db->getAllArray('SELECT username, email FROM ' . db_users . ' WHERE email != "";');
$number_sent = count($names);
$mail->Subject = $subject;
foreach ($names as $row) {
$mail->addAddress($row['email'], $row['username']);
$mail->Body = str_replace('%USER%', $row['username'], $message);
if (!$mail->Send()) {
echo 'ERROR:<HR>';