Home Backend Development PHP Tutorial php获取当前URL地址和参数解决方案

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

Jun 13, 2016 am 10:23 AM
casio index match tag

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
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What file is index.html? What file is index.html? Feb 19, 2024 pm 01:36 PM

index.html represents the home page file of the web page and is the default page of the website. When a user visits a website, the index.html page is usually loaded first. HTML (HypertextMarkupLanguage) is a markup language used to create web pages, and index.html is also an HTML file. It contains the structure and content of a web page, as well as tags and elements used for formatting and layout. Here is an example index.html code: &lt

Is Huawei tag useful? Is Huawei tag useful? Nov 07, 2023 pm 03:24 PM

Huawei Tag is useful in helping users track and locate items. Huawei Tag is an intelligent positioning device launched by Huawei. It can help users track and locate the location of items. It can help users retrieve lost items, prevent items from being stolen, provide remote alarm functions, and add items through the community help function. Chances of recovery. However, it should be noted that Tag’s positioning range is limited and relies on mobile phone connection. Users also need to pay attention to the protection of personal privacy.

what is mysql index what is mysql index Oct 08, 2023 am 11:47 AM

The index in MySQL means index. It is a data structure used to speed up the query of database tables. The index can be compared to the catalog of a book. It stores the values ​​​​of specific columns in the table and the corresponding row positions, making the database more efficient. Locate and access data quickly. The function of the index is to improve query efficiency. Without an index, the database needs to scan the entire table row by row to find matching data. This method will be very time-consuming in large tables. With an index, the database can The required data rows are quickly located in the order, which greatly improves the query speed.

How to solve the deadlock caused by MySQL optimization index merge How to solve the deadlock caused by MySQL optimization index merge May 27, 2023 pm 05:49 PM

A deadlock occurred in the background production environment. By checking the deadlock log, we saw that the deadlock was caused by two identical update statements (only the values ​​in the where condition were different), as follows: UPDATEtest_tableSET`status`=1WHERE`trans_id`=' xxx1'AND`status`=0;UPDATEtest_tableSET`status`=1WHERE`trans_id`='xxx2'AND`status`=0; It was confusing at first, but after a lot of querying and learning, the deadlock was analyzed

PHP source code running problem: index error solution PHP source code running problem: index error solution Mar 09, 2024 pm 09:24 PM

PHP source code running problem: Index error resolution requires specific code examples. PHP is a widely used server-side scripting language that is often used to develop dynamic websites and web applications. However, sometimes you will encounter various problems when running PHP source code, among which "index error" is a common situation. This article will introduce some common causes and solutions of index errors, and provide specific code examples to help readers better deal with such problems. Problem Description: When running a PHP program

How to remove index.php from https How to remove index.php from https Jun 16, 2023 am 11:41 AM

How to remove index.php from https: 1. Modify the server settings, find the .htaccess file on the server and open it, enter "RewriteEngine On...</IfModule>" and other contents in the file, and then save the file; 2 . Use the URL settings of the CMS system, select "Permalink" in the settings, select "Post Name" in the general settings, and then click "Save Changes"; 3. Use a plug-in to help you remove index.php.

Match matching method in java Match matching method in java Apr 28, 2023 pm 10:31 PM

Note that match is used for matching operations, and its return value is of boolean type. Through match, you can simply verify whether a certain element exists in the list. Example // Verify whether there is a string in the list starting with a, and match the first one, that is, return truebooleananyStartsWithA=stringCollection.stream().anyMatch((s)->s.startsWith("a"));System.out .println(anyStartsWithA);//true//Verify whether the string in the list

How to use regular expressions to match strings in Java? How to use regular expressions to match strings in Java? Apr 19, 2023 pm 02:37 PM

Concept 1. Various Match operations can be used to determine whether a given Predicate meets the elements of a Stream. 2. Match operation is a terminal operation and returns a Boolean value. Instance booleananyStartsWithA=stringCollection.stream().anyMatch((s)->s.startsWith("a"));System.out.println(anyStartsWithA);//truebooleanallStartsWithA=stringCollection.stream().

See all articles