我有一个必须链接到“此页面” /#contacts的全局按钮

时间:2019-07-04 10:15:38

标签: php html

我希望此按钮将我发送到实际页面的底部而不重新加载页面,我已经尝试过了,但是页面重新加载了

<?php
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}/#contacts";
?>


<div class="header-button">
  <a href="<?php echo ($actual_link); ?>">
    <span class="icon_phone">BOOK</span>
  </a>
</div>

0 个答案:

没有答案