怎么获取图片所在页面的url

WBOY
Release: 2016-06-13 12:15:20
Original
1642 people have browsed it

如何获取图片所在页面的url
怎么获取图片所在页面的url

请问如何在img.php中获取该图片所在页面的url.

如:www.domain.com/123.html中有图片怎么获取图片所在页面的url
用img.php如何获取www.domain.com/123.html这个url.


------解决思路----------------------
$_SERVER['HTTP_REFERER'] 就是
------解决思路----------------------
可以使用$_SERVER['HTTP_REFERER'] 来取得来源地址.
------解决思路----------------------

引用:
怎么获取图片所在页面的url

请问如何在img.php中获取该图片所在页面的url.

如:www.domain.com/123.html中有图片怎么获取图片所在页面的url
用img.php如何获取www.domain.com/123.html这个url.

这个应该简单吧
$_SERVER['HTTP_REFERER'] 取得来源地址.,都是内置函数
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!