php 数组 json字段去不全,json_encode – PHP给出了不完整的json字符串
首先我的環境:
PHP 5.3.2 – 使用Suoshin和xCache
的lighttpd / 1.4.26
我的代碼太多了,不能在這里發布.我會說出來的.
文件x.php正在加載一些PHP – Classe,初始化它們,執行一些函數 – >獲取Result數組.
如果我print_r這個數組我得到一個完整的結果.
但是我使用json_encode,它每次都在相同的位置切割它. – > json無效.
例:
print_r-
Array
(
[test1] => Array
(
[test2] => 2
[test3] => Array
(
[test4] => 4
)
)
)
json –
{"test1":{"test2":2,"test3":{"te
錯誤日志說明如下:
(mod_fastcgi.c.2582) unexpected end-of-file (perhaps the fastcgi process died): pid: 16708 socket: unix:/tmp/php5.socket-1
(mod_fastcgi.c.3382) response already sent out, but backend returned error on socket: unix:/tmp/php5.socket-1 for /x.php?, terminating connection
問題是如何跟蹤錯誤是什么?或者有人知道這個問題是什么?
總結
以上是生活随笔為你收集整理的php 数组 json字段去不全,json_encode – PHP给出了不完整的json字符串的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算占比并保证百分比和为1
- 下一篇: mysql服务器默认操作字符集,如何在m