Php variables are too long to be processed.
$ A = "long stuff @ Long stuff @... ";
$ B = explode ("@", $ );
Foreach ($ B as $ k => $ v)
{... // Enter the database}
// $ A is too long. you can delete a large number of items to perform the operation normally.
What should I do?
Reply to discussion (solution)
The string length should not be a direct cause. it is estimated that too many arrays are the main cause.
Therefore, consider stream reading strings, read part of the extracted regular part of the processing, then read the next part, splice the first part to extract the remaining ...... Follow this cycle
The first time I heard that variables are too long to be processed, I suggest you give an example. Why can't I handle it "?
I used excel to import the csv format, convert it to a json string using vba, and send it to php through the page. the result of the check is that there is a problem during excel conversion, format Error
{... // Enter the database}
Whether it is your database table or not, and the length of the field is set.
Is your memory too small?
Is the insert failure caused by addslashes not used?
The field type you write is set to text type, and is converted to {...} json type to be inserted into the database field.
1. split into multiple parts according to certain rules
2. process each copy in a loop
I learned from the great gods that the original explode
The function cannot contain long characters and later uses regular expressions.