有没有一种快速创建链接的方法,点击该链接后,用户可以通过 mailto 发送他们所在页面的链接?
最佳答案
要发送您所在页面的链接,请尝试使用以下代码:
<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>
php 将获取您当前所在页面的 url。
关于php - 创建 "email this page"到某人链接的快速简单方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10581649/