我有以下代码:
<!DOCTYPE html>
<html>
<body>
<footer>
<p>
<font size="2px">The shared documents above are
the property of <b><a href="<?php $_SESSION["Website"] ?>"><?php echo $_SESSION["companyname"] ?></a></b>
and any files are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this link in error please notify our <a href="mailto:someone@example.com">admin team</a>.
</p>
<p>
<font size="2px">If you are not the named addressee you should not disseminate, download, distribute or copy any documentation and should delete the email immediately.
<font size="2.5px" color="PaleGoldenRod" ><b> IMSdrive is owned by <a href="http://www.jkgsoft.com">JKGsoft</a> All rights reserved 2015.</b>
</p>
</footer>
</body>
</html>
在大多数情况下,它应该以它应该的方式工作,但是在第一个会话值上,将公司网站放在htref元素中,尽管它在屏幕上显示它应该,但它没有指向正确的网站,截图here。
我知道$_SESSION["Website"]
正在运行,因为我已尝试在标题中回显它,只是想知道是否有人可以告诉我为什么它不会逃离这个网站,当你将鼠标悬停在上面或点击链接时它基本上带你到你已经在的页面。
任何帮助都将不胜感激,谢谢。
答案 0 :(得分:0)
使用<?php session_start(); ?>
在本页顶部。