English 中文(简体)
如何避免在邮件功能中显示超文本标签
原标题:How to avoid display of HTML tags in mail function
  • 时间:2010-08-13 11:21:26
  •  标签:
  • php
  • html

我有邮件功能,并做罚款,我收到邮件。 但问题是,我也获得超文本标签。 我的法典如下:

$from=$_REQUEST[ id ];  
$to  =  xyz@abc.com ;  

$headers .=  MIME-Version: 1.0  . "
";  
$headers .=  Content-type: text/html; charset=iso-8859-1  . "
";  

$headers = "From: $from 
" .  
    "Reply-To: $from 
" .  
    "X-Mailer: PHP/" . phpversion();  

$subject="Contact Mail has received";  

$message=" SOME HTML TAGS ";

在电文机构内,我有诸如<代码>的、trtd等超文本标签。 但当我收到邮件时,我拿不上桌。 我收到了所有超文本标签,作为<代码> >,tr,td。 在标题中,我甚至指定了内容类型如下:text/html>,但我仍然有同样的问题。

我如何能够避免这种情况?

最佳回答

您的号码是text/html>,因为你对你来说太过了!

这里,你将它搁置起来:

$headers .=  MIME-Version: 1.0  . "
";  
$headers .=  Content-type: text/html; charset=iso-8859-1  . "
";  

$headers = "From: $from 
" .  
       "Reply-To: $from 
" .  
       "X-Mailer: PHP/" . phpversion();  

应当:

$headers .=  MIME-Version: 1.0  . "
";  
$headers .=  Content-type: text/html; charset=iso-8859-1  . "
";  

$headers .= "From: $from 
" .  
       "Reply-To: $from 
" .  
       "X-Mailer: PHP/" . phpversion();  

你们失去了对更多头脑的指针。 这超出了您的内容提要,因此,它把电子邮件作为文本,没有超文本。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签