Encountered a GET parameter problem! Wait until 100!

Source: Internet
Author: User
A get parameter problem is encountered! Request help. please wait until 100 !!! Address: region. php? Act = Modify & amp; Province = Beijing & amp; City = Haidian will show: Internal? Server? ErrorThe? Server? Encountered? A encountered a GET parameter problem! Request help. please wait until 100 !!!
Address:
Region. php? Act = Modify & Province = Beijing & City = Haidian
:
Internal? Server? Error
The? Server? Encountered? An? Internal? Error? Or? Misconfiguration? And? Was? Unable? To? Complete? Your? Request.

Please? Contact? The? Server? Administrator ,? Lihuijun8193@163.com? And? Inform? Them? Of? The? Time? The? Error? Occurred ,? And? Anything? You? Might? Have? Done? That? May? Have? Caused? The? Error.

More? Information? About? This? Error? May? Be? Available? In? The? Server? Error? Log.


--------------------------------------------

Apache/2.0.52? (Win32 )? Server? At? Lll? Port? 80

Will: region. php? Act = Modify & Province = Beijing & City = Haidian changed:
Region. php? Act = Modify & Province = lsdk & City = lul
There is no problem with the access.
Why cannot the server accept "Chinese parameters ";
Request help. waiting online:
Php5.0 + apache? 2 + xp? Local test server.



------ Solution --------------------
Url encoding
------ Solution --------------------
Urlencode your Chinese value
------ Solution --------------------
Urlencode
------ Solution --------------------
Urlencode
------ Solution --------------------
Solved, followed by points
------ Solution --------------------
Urlencode, which of the following code is used:
------ Solution --------------------
Can be passed directly

But not compatible with firefox
------ Solution --------------------
When linking :? 'Region. php? Act = Modify & Province = '. urlencode ('Beijing').' & City = '. urlencode ('haidian ');
When receiving parameters :? $ Province? =? Urldecode ($ _ GET ['Province ']);
? ? ? ? ? ? ? ? ? ? ? ? $ City? =? Urldecode ($ _ GET ['city']);
------ Solution --------------------
Region. php? Act = Modify & Province = Beijing & City = Haidian

Do you mean to enter Chinese characters directly in the address bar of your browser?

First, what encoding type does your page use? If it is GBK or GB2312, this problem does not exist. if it is all UTF-8, it needs to be converted into encoding.
Because the text entered in the browser on the client is encoded by default by the operating system, generally, Chinese xp uses GBK, so after you GET it on the page, it will not be consistent with your UTF-8 encoding, and it will be garbled after get.

Solution:
$ Province? =? Iconv ('', 'utf-8', $ _ GET ['Province ']);
$ City? =? Iconv ('', 'utf-8', $ _ GET ['city']);

Ensure that your server supports the iconv function. Otherwise, use other transcoding methods.
Recommended solution for my abnormal network:The server encountered an internal error () that prevented it from fulfilling this request., http://www.myexception.cn/java-web/317.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.