快速简便地为某人链接创建"通过电子邮件发送此页面"?

Rob*_*Rob 5 html php

是否有一种快速创建链接的方法,单击该链接后,用户可以通过mailto发送他们所在页面的链接?

Bad*_*Cat 6

要发送您正好在的页面的链接,请尝试使用以下代码:

<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将获取您当前所在页面的网址.