php获取当前URL地址和参数解决方案

WBOY
Release: 2016-06-13 10:23:24
Original
957 people have browsed it

php获取当前URL地址和参数
http://biao.lequj.com/pin-index-cat-6-tag-Casio/%E5%8D%A1%E8%A5%BF%E6%AC%A7.html

php如何获取tag-后面的参数

------解决方案--------------------

PHP code
$str = 'http://biao.lequj.com/pin-index-cat-6-tag-Casio/%E5%8D%A1%E8%A5%BF%E6%AC%A7.html';preg_match('/tag-(.*).html$/i', $str, $match);if (isset($match[1]))    echo urldecode($match[1]);<div class="clear">
                 
              
              
        
            </div>
Copy after login
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!