資料注冊后發(fā)信小技巧
更新時間:2006年10月09日 00:00:00 作者:
<?php
//mail.php
//讀信內(nèi)容
$filename = "wellcom.txt";
$fd = fopen( $filename, "r" );
$contents = fread($fd, filesize($filename));
fclose( $fd );
//替換其中相應(yīng)內(nèi)容
$contents=eregi_replace("<username>",$UserName,$contents);
$contents=eregi_replace("<password>",$Password,$contents);
$contents=eregi_replace("<url>",$Url,$contents);
//發(fā)信
$to_email=$email;
$from_email="php-java@21cn.com";
$subject="Wellcom!";
$header_info="From:$from_email\nReply-To:$from_email";
$result=@mail($to_email,$subject,$contents,$header_info);
if($result) {
echo "發(fā)信成功!";
} else {
echo "發(fā)信失??!";
}
?>
//wellcom.txt內(nèi)容;
您的注冊資料為:
用戶名:<username>
密碼:<password>
歡迎您的到來!
歡迎訪問:<url>
//mail.php
//讀信內(nèi)容
$filename = "wellcom.txt";
$fd = fopen( $filename, "r" );
$contents = fread($fd, filesize($filename));
fclose( $fd );
//替換其中相應(yīng)內(nèi)容
$contents=eregi_replace("<username>",$UserName,$contents);
$contents=eregi_replace("<password>",$Password,$contents);
$contents=eregi_replace("<url>",$Url,$contents);
//發(fā)信
$to_email=$email;
$from_email="php-java@21cn.com";
$subject="Wellcom!";
$header_info="From:$from_email\nReply-To:$from_email";
$result=@mail($to_email,$subject,$contents,$header_info);
if($result) {
echo "發(fā)信成功!";
} else {
echo "發(fā)信失??!";
}
?>
//wellcom.txt內(nèi)容;
您的注冊資料為:
用戶名:<username>
密碼:<password>
歡迎您的到來!
歡迎訪問:<url>

PHP的mysqli_stmt_init()函數(shù)講解
今天小編就為大家分享一篇關(guān)于PHP的mysqli_stmt_init()函數(shù)講解,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧
2019-01-01 
《PHP邊學邊教》(02.Apache+PHP環(huán)境配置——上篇)
這篇文章主要介紹了《PHP邊學邊教》02.Apache+PHP環(huán)境配置
2006-12-12 
PHP convert_cyr_string()函數(shù)講解
今天小編就為大家分享一篇關(guān)于PHP convert_cyr_string()函數(shù)講解,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧
2019-02-02