A strange problem that development cannot return data. This post was last edited by programmer_wei from 2014-03-1600: 46: 52 with the following code: & nbsp; & nbsp; & nbs strange issues that do not return data during development
At the end of this post, the code was edited by programmer_wei at 00:46:52:
// Get the code of the td column
$ Regex = "/
([\ S \ S] *?) <\/Td> /";
$ Str = file_get_contents ('http: // www.zh818.com/get/quanguo-jg /');
$ Matches = array ();
Preg_match_all ($ regex, $ str, $ matches );
Echo "\ n ";
// Obtain the URL
$ Href = '// is ';
$ Href_single = array ();
If (preg_match ($ href, $ matches [0] [1], $ href_single ))
// Obtain the table information based on the obtained URL.
$ Regex = '/
. * ([\ D \.] + ?). * <\/Table>/sU ';
$ Str = file_get_contents ($ href_single [1]);
$ Matches = array ();
If (preg_match ($ regex, $ str, $ matches ))
$ Result = $ this-> transmitText ($ object, $ matches );
[Size = 13px] the function I want to implement is to send a request to a mobile phone user. the server obtains the specified information by using a regular expression in the html code of a website, and then returns it to the user through the interface, however, when a client user sends a request, it cannot receive the returned information. I thought it was caused by the timeout of the server connection to the corresponding website, however, when I change $ href_single [1] in the fourth last line of the code to an http URL, the mobile terminal can receive the returned information after testing, however, the content in $ href_single [1] is actually an http website. The formats are the same. what is the problem? [/Size]
------ Solution --------------------
SAE cannot use the file_get_contents function