$to = "hugorod@hugorod.es";
$from = "hugorodadmin@hugorod.es";
$subject = "Subject";
$message = "<p>Please see the attachment.</p>";
$separator = md5(time());
$eol = PHP_EOL;
$filename = date('d.m.y-H:i:s') . "_". $_POST['fName'] . "_" . $_POST['gName'] . ".txt";
$data = $_POST['fName'] . ',' . $_POST['gName'] ."\n";
$attachment = chunk_split(base64_encode($data));
$headers = "From: ".$from.$eol;
$headers .= "MIME-Version: 1.0".$eol;
$headers .= "Content-Type: multipart/mixed; boundary=\"".$separator."\"";
$body = "--".$separator.$eol;
$body .= "Content-Transfer-Encoding: 7bit".$eol.$eol;
$body .= "This is a MIME encoded message.".$eol;
$body .= "--".$separator.$eol;
$body .= "Content-Type: text/html; charset=\"iso-8859-1\"".$eol;
$body .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
$body .= $message.$eol;
// attachment
$body .= "--".$separator.$eol;
$body .= "Content-Type: application/octet-stream; name=\"".$filename."\"".$eol;
$body .= "Content-Transfer-Encoding: base64".$eol;
$body .= "Content-Disposition: attachment".$eol.$eol;
$body .= $attachment.$eol;
$body .= "--".$separator."--";
mail($to, $subject, $body, $headers);
返回:
paste(Pattern("openfiledialog.png").targetOffset(-140,1),
'C:\sikuliTests\ITEstandAlone.sikuli\ITEtest\122L_InputModel.STL')
类型而不是粘贴做同样的事情。该模式是打开文件对话框中的标准编辑字段。
答案 0 :(得分:0)
在这种情况下,您的情况是,Sikuli根据ascii编码将\122
读为R
,因此您在结果字符串中得到R
。这可以通过在\122
之前添加“转义字符”来轻松修复:
C:\sikuliTests\ITEstandAlone.sikuli\ITEtest\\122L_InputModel.STL