How can I interpolate an existing php string literal inside a json file?

前端 未结 4 1897
一生所求
一生所求 2021-02-13 02:39

I have a php script , it accessing a json file by using file_get_contents(), inside a json file, we have declared a php variable. Please let me know is there any w

4条回答
  •  迷失自我
    2021-02-13 03:28

    I might get downvoted for this, but could eval be used in this situation?

    Output:

    {
        "result":"Hello world",
        "count":3
    }
    

提交回复
热议问题