Jump to content
php.lv forumi

str_replace nestrādā


Cibiņš

Recommended Posts

Kapēc nosūtot e-pastu ja cilvēks ir ielicis piem attēlu, pie submit neaizvietojas vārds?

 

$msgname=$_POST['messagename'];
$msgtxt=$_POST['messagetext'];

$oldimage = 'src="resources/';
$newimage='src="http://www.lapa.lv/resources/';

$newtext = str_replace($oldimage, $newimage, $msgtxt);

$message = "<span class='controlGreen'>Ziņa nosūtīta sekmīgi</span>";

$frommail="[email protected]";
$msgheader="Jauna ziņa no Lapa: ".$msgname;

$mailheaders  = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/html; charset=UTF-8\r\n";
$mailheaders .= "From: ".$frommail." <".$frommail.">\r\n";
$mailheaders .= "Reply-To: ".$frommail." <".$frommail.">\r\n";
$mailmsg .= "
<html>
<header>
</header>
<body>
".$newtext."
</body>
</html>
";

Edited by Cibiņš
Link to comment
Share on other sites

$mailheaders .= "Content-type: text/html; charset=UTF-8\r\n";<pre class="prettyprint">

text/html aizvietojot ar text/plain attēla no

resources/

uz

http://www.lapa.lv/resources/ 

direktoriju viņš nav samainījis! Moš ir vēl kādi varianti kā aizvietot noteiktus vārdus?

Edited by Cibiņš
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...