开发者

PHp + space in linux

In my below code I am replacing . with a non-breaking space using  

$orginal_startString = str_replace('.',' ',$startString);

This works fine in windows and save in databas开发者_运维知识库e but in linux it's not woking properl it's replacing . with special character Â.


If you want space as text not HTML, Use the hex equivalent 0x20.

$orginal_startString = str_replace('.',chr(0x20),$startString);

And check this HTML encoding issues - "Â" character showing up instead of " "

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜