Home > Backend Development > PHP Problem > How to solve garbled URL in php

How to solve garbled URL in php

WJ
Release: 2023-03-01 11:28:02
Original
2544 people have browsed it

How to solve garbled URL in php

php method to solve the garbled URL:

In HTML, transfer the data to the URL

How to solve garbled URL in php

When I click "Submit Reply", the jump page will display:

How to solve garbled URL in php

We get this parameter:

How to solve garbled URL in php

But since the parameters passed are in Chinese, the url will be automatically parsed into binary codes, then the data we receive in the background is parsed:

How to solve garbled URL in php

Then How do we solve it? PHP provides us with a function: urldecode(). We can just parse it in the receiving page:

 How to solve garbled URL in php

 Output effect:

 How to solve garbled URL in php

Related references:php中文网

The above is the detailed content of How to solve garbled URL in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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