0
ニュースレターを送るには以下のページがあります。私は、ツールバーのアイコンから画像を含めるPHPとCKEditorに含まれる画像はメールに表示されません
。リアルタイムで正しく表示されます。しかし、私が[送信]をクリックすると、電子メールはイメージなしでメッセージを取得します。ただ、唯一のメッセージ(エディタでフォーマットされたテキストが正しく表示されます)
私のイメージは、このURLにあります:http://raveen.comlu.com/sport.jpg
はまた、私は、同様のメッセージを送信した後に、エディタによって作られたコンテンツを印刷します。 でもそこにも、画像は(スクリーンショットを参照)ページには表示されません
I次のコードを持っています。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> A simple page with CKEditor </title>
<script src="ckeditor/ckeditor.js"> </script>
</head>
<body>
<form method="post" action="">
<!-- Create a <textarea> element first -->
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
//replace the <textarea id="editor1"> with a CKEditor instance
CKEDITOR.replace('editor1');
//Retrieve data from CKEditor instance with ID of editor1
var data = CKEDITOR.instances.editor1.getData()
</script>
<input type="submit" name="btnSubmit" value="Send">
</form>
<?php
if(isset($_POST['btnSubmit'])){
$editor_data = $_POST['editor1'];
echo $editor_data;
$to = "[email protected], [email protected]";
$subject = "Here is the subject";
$message = $editor_data;
$header = "From: Sender Name <[email protected]> \r\n";
$header .= "MIME-Version: 1.0 \r\n";
$header .= "Content-type:text/html;charset=UTF-8 \r\n";
$retval = mail($to, $subject, $message, $header);
if($retval == true){
echo "Message sent successfully";
}
else{
echo "Message could not be sent!";
}
}
?>
</body>
おかげでたくさんの前にこの行を追加してみてくださいすることができますので、あなたのエディタデータから、あなたの引用符のすべてがエスケープされています。ロット –