$message .= "
<html>
<head>
<title>Copy of your form submission</title>
</head>
<body>
<table>
<tr>
<td>
"<img src="images/assets/thank_you.png" alt="Thank You" />"
</td>
</tr>
</table>
</div>
</html>
";
如果我写
$message .= 上面相同的图像链接;
它正在工作。但是当我像上面那样将图像标签写入 html 时,就不起作用了。有人可以帮忙吗?
最佳答案
不需要使用引号 "
周围img
标签。也可以使用单引号 '
双引号内 "
用过的。如下所示:
$message .= "
<html>
<head>
<title>Copy of your form submission</title>
</head>
<body>
<table>
<tr>
<td>
<img src='images/assets/thank_you.png' alt = 'Thank You' />
</td>
</tr>
</table>
</div>
</html>";
关于php - 如果我在该图像中写入另一个变量,则图像标记在 php html 中不起作用。请找到下面所附的代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52092730/