資料注冊后發(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ā)信失?。?quot;;
}
?>
//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ā)信失?。?quot;;
}
?>
//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
談?wù)勑率秩绾螌W(xué)習(xí)PHP 默默經(jīng)典版本
從默默自己向別人問怎么學(xué)PHP開始,到后來不少人又來問默默怎么學(xué)PHP,不管默默是新手,還是老鳥,似乎總是感覺摸不出一條清晰的脈絡(luò)來,不過,默默既然學(xué)會了PHP,那么我走的這條路或多或少的有一定借鑒性。
2009-08-08
《PHP邊學(xué)邊教》(02.Apache+PHP環(huán)境配置——上篇)
這篇文章主要介紹了《PHP邊學(xué)邊教》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 
