1
這是我的郵件程序的$header
代碼。php變量不包含字符串
我想在from:<>
中打印$em
的值,但遺憾的是它不起作用。
我不知道在專家級別的PHP,所以很好解決這個問題,我也想知道爲什麼會發生這種情況。
$em="[email protected]";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: <$em>" . "\r\n";
echo $headers;
電流輸出:
MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 From:
預期輸出:
MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 From: <[email protected]>
'$標誌=電子郵件($到,$主題,$消息,$頭);'可以請你看在這個代碼我的郵箱不能正常工作 –