解决方案 »

  1.   

    你的json 文件是带有BOM头的UTF-8格式吧?去掉BOM头看下
      

  2.   

    哪幅截图是$json2_string的 , 分开贴一下。
      

  3.   

    ./js/recommendMenu.json 用连接的形式打开看看行不行?
      

  4.   

    echo print_r($json_string,true);
    只是打印了读取到的字符串没有在你的代码中看到 json_decode($json_string) 字样,你怎么就知道不能解析呢?
      

  5.   

    $obj=json_decode($json2_string,true);
    if (!is_array($obj)) die('no successful');有提示?
      

  6.   

    一楼说的对,我的编码是BOM头的utf-8格式,去掉了就和字符串的一样