For cross-origin value transfer problems, there are now A page and B page (on different servers), and the & nbsp; A page needs to get the value passed through B page and insert it to the database on page: file_get_contents( B .html) this is a one-dimensional array returned by page B. However, according to the features of file_get_contents, it is still possible to read the string and return the cross-origin value.
There are now Page A and page B (on different servers ),
On page A, you need to obtain the value passed through on page B and insert it to the database on page A: file_get_contents (B .html)
This is A one-dimensional array returned by page B, but according to the features of file_get_contents, it is still read as A string and returned to page,
So now the question is how to convert the seemingly array string obtained on page B to a real array?
------ Solution --------------------
What is the format of B .html arrays?
If you can set it, serialize the B .html array as a string. Refer to the serialize () function
------ Solution --------------------
PHP code
$ S = <TXTArray ([1] => first [2] => second [3] => third) TXT; preg_match_all ('/\ [(\ w +) \] => (. +) $/M', $ s, $ r); $ ar = array_combine ($ r [1], $ r [2]);