开发者

A simple question in PHP but need help

To percent 开发者_如何学JAVAencode a input string (an XML file), only for % and line terminators..


Don't roll your own URL encoding. Use the built-in stuff.

$xml = urlencode($xml);


If I understood your question correctly, you'll need to do something like

$input .= 'datacenter: ' . str_replace(array('\n', '\r'), array('%0A', '%0D'), $xmlfile) . "\n"; 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜