开发者

LAMP server on SuseLinux character set problem with Apache and php

开发者 https://www.devze.com 2023-01-22 05:59 出处:网络
Hi Guys I have installed LAMP server on suse linux on Amazon. Here is the server info Basic 32-bit Amazon Linux AMI 1.0 (AMI Id: ami-08728661)

Hi Guys I have installed LAMP server on suse linux on Amazon. Here is the server info

Basic 32-bit Amazon Linux AMI 1.0 (AMI Id: ami-08728661) Amazon Linux AMI Base 1.0, EBS boot, 32-bit architecture with Amazon EC2 AMI Tools.

I am trying to pass some special charters through a URL to PHP script but am not able to get it usin开发者_如何学Gog $_GET['data'] in php.

THIS WORKS localhost/test.php?data=testdata

THIS FAILS localhost/test.php?data={testdata

so the special character "{" fails for some reason.... IS is apache or php encoding problem?

Any help would be highly appreciated.


Url can only contain ASCII character set, so special characters can not be there. You need to urlencode you parameters.

$data = urlencode($data);
http://localhost/?data=$data
0

精彩评论

暂无评论...
验证码 换一张
取 消