I use this code to get the full URL:
(我使用以下代码来获取完整的URL:)
$actual_link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
The problem is that I use some masks in my .htaccess
, so what we see in the URL is not always the real path of the file.
(问题是我在.htaccess
使用了一些掩码,因此我们在URL中看到的并不总是文件的真实路径。)
What I need is to get the URL, what is written in the URL, nothing more and nothing less—the full URL.
(我需要的是获取URL,写在URL中的内容,仅此而已-完整的URL。)
I need to get how it appears in the Navigation Bar in the web browser, and not the real path of the file on the server.
(我需要了解它在Web浏览器的导航栏中的显示方式,而不是服务器上文件的真实路径。)
ask by DiegoP. translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…