The strange problem that WeChat developers cannot return data

Source: Internet
Author: User
For a strange problem that development cannot return data, run the code first:
// Get the code of the td column $ regex = "/([\ S \ S] *?) <\/Td>/"; $ str = file_get_contents ('http: // records); $ 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 table information based on the obtained URL $ regex = '/


The query seems to be a problem with Sina sae, but I don't know how to solve it.

SAE cannot use the file_get_contents function

SAE cannot use the file_get_contents function
Well, we can use $ f = new SaeFetchurl (); $ str = $ f-> fetch ($ href_single [1, however, file_get_contents can directly input the URL string.

. * ([\ 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] Reply to discussion (solution)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.