要发送您正好在的页面的链接,请尝试使用以下代码:
<a HREF="mailto:?subject=look at this website&body=Hi,I found this website
and thought you might like it <?php
$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
echo $url;
?>">Tell a friend!</a>
Run Code Online (Sandbox Code Playgroud)
php将获取您当前所在页面的网址.