开发者

AJAX file upload without JSON

I have PHP installed withou JSON. And not possible to install. After some googling found only plugin that do upload file by AJAX but all with JSON. 开发者_StackOverflowis it possible to remake to xml? Thanks.


You can simulate JSON like:

echo "{";
echo                "error: '" . $error . "',\n";
echo                "msg: '" . $msg . "'\n";
echo "}";

It doesn't require install any json library in php.


There are plenty of libraries for decoding/encoding JSON in PHP without needing the compiled extension. Take a look at the list under "PHP" at JSON.org.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜