Array being chopped off over ajax post. Ajax posting limit?

后端 未结 4 2097
温柔的废话
温柔的废话 2021-01-02 11:37

I have a multidimensional array, which consists of 426 smaller arrays, which also comprise of 4 attributes.. Below is an example of one of 426 arrays...

             


        
4条回答
  •  没有蜡笔的小新
    2021-01-02 12:32

    You should convert all your data in json format at the client side and send it as a text.

    var jsonDataString = JSON.stringify(data)
    //data - array, associative array, any other variables
    
    $.ajax({
    ...
        data: {
            friends: jsonDataString,
        }
    ...
    });
    

    At the server side just decode json file.

    Changing of php.ini is not a good idea because of security risks.

提交回复
热议问题