开发者

Weird Hanging Codeigniter

开发者 https://www.devze.com 2023-01-25 03:48 出处:网络
So I have a Codeigniter application which uses Curl to retrieve an XML file from an external source. This works fine. I have set up log_message() so I can view the logs(tail -f) when the XML has been

So I have a Codeigniter application which uses Curl to retrieve an XML file from an external source.

This works fine. I have set up log_message() so I can view the logs(tail -f) when the XML has been received. After this I load the view with a message to show the XML has successfully been retrieved. This is also logged.

Now here is the weird thing. Although my logs show that the XML has been retrieved and the view has been loaded my browser still hangs? I just sits there, blank screen.

This is intermittent, 5% of the time it hangs...

Any ideas?

Here is my Curl method, just in case it helps...

    function curl_me($url, $data = null){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIE开发者_如何学PythonLDS, $data); 
    $response = curl_exec($ch);
    return $response;
}


Im not 100% sure, but my first guess would be to check for character encodings in your XML. Make sure that the XML that is returned can be parsed correctly.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号