我正在使用HTML mailto链接,并希望在内部使用php在电子邮件上显示$_SESSION['']信息。
<p>You do not currently have permission to access this tool.</p>
<p>Please contact admin at
<a href="mailto:test@gmail.com?
&subject=Requesting%20access%20to%20the%20page_access%20tool
&body=Hi,%0D%0A%0D%0AThis%20is%20<?php$_SESSION['email']?>.%20Please%20provide%20me%20access%20to%20the%20tool.">
uas.hub@gmail.com</a>
to request access to this page.</p>
目前,这显示在电子邮件中:这是<?php$_SESSION['email']?>
。请允许我使用该工具。
如何只显示电子邮件而不显示所有php代码?
您的代码中没有echo
。
<?php echo $_SESSION['email']; ?>