This article will introduce to you that when we submit a form, if the form uses the get method, then what we get using get will be garbled characters. Let me take a look at how to solve this problem.
I originally planned to use it this way
The code is as follows
|
Copy code
|
[View Jurisdiction News]
The result obtained on the list.php page is - View [Jurisdiction Movement]
I think it may be that the encoding of the Chinese character "state" conflicts with something, so. . .
代码如下 |
复制代码 |
$plate=urldecode($_GET['plate']);
|
I found this solution online:
Use:
The code is as follows
|
Copy code
|
" charset="utf-8" target="main">[View]< ;/a>
Then use this on the list.php page
代码如下 |
复制代码 |
$query_string = 'foo=' . urlencode($foo) . '&bar=' . urlencode($bar);
echo '';
?>
|
The code is as follows |
Copy code |
|
$plate=urldecode($_GET['plate']);
There will be no garbled characters or abnormal transmission
About string urlencode (string $str) function
This function facilitates encoding a string and using it in the request part of the URL, and it also facilitates passing variables to the next page.
Example #1 urlencode() Example
|
|