Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道有很多关于它的问题,但我想知道如何使用 PHP 安全地获取当前 URL。我需要它显示在og:url元标记中。
og:url
谢谢!
echo $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
这将为您提供完整的URL.
URL