Hướng dẫn how to decode url php - cách giải mã url php

[Php 4, Php 5, Php 7, Php 8]

URLDECODE-Chuỗi được mã hóa URL được mã hóaDecodes URL-encoded string

Sự mô tả

Urldecode [Chuỗi $string]: Chuỗi[string $string]: string

Thông số

string

Chuỗi được giải mã.

Trả về giá trị

Trả về chuỗi được giải mã.

Ví dụ

Ví dụ #1 urldecode [] ví dụurldecode[] example

Ghi chú

Cảnh báo

Superglobals $ _Get và $ _Request đã được giải mã. Sử dụng urldecode [] trên một phần tử trong $ _get hoặc $ _Request có thể có kết quả bất ngờ và nguy hiểm.urldecode[] on an element in $_GET or $_REQUEST could have unexpected and dangerous results.

Xem thêm

  • urlencode [] - Chuỗi mã hóa url
  • RAWURLENCODE [] - Mã điện tử URL theo RFC 3986
  • RawUrldecode [] - Chuỗi mã hóa URL giải mã
  • »& NBSP; RFC 3986

Alejandro tại Devenet Dot Net

11 năm trước

When the client send Get data, utf-8 character encoding have a tiny problem with the urlencode.
Consider the "º" character.
Some clients can send [as example]
foo.php?myvar=%BA
and another clients send
foo.php?myvar=%C2%BA [The "right" url encoding]

in this scenary, you assign the value into variable $x



$x store: in the first case "�" [bad] and in the second case "º" [good]

To fix that, you can use this function:



and assign in this way:

string0

string1

string2

string3

string4

string5

Trực quan ¶

16 năm trước

string6

Jan Vratny ¶

14 năm trước

string7

string8

string5

Tomas tại Penajaca dot com dot br ¶

19 năm trước

Bài Viết Liên Quan

Chủ Đề