这是我的代码PHP中的Curl会抛出异常吗?
<?php
$url = "http://i.imgur.com/qV39tsL.gif";
$ch = curl_init();
echo $ch;
$timeout = 20;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$content = curl_exec($ch);
curl_close($ch);
echo $content;
?>
在我的环境,我的访问速度互联网是一个有点慢,所以有时我无法从imgur下载一些GIF格式。
但什么困惑我的是,我经常得到一个错误如下:
**ERROR 500: Internal Server Error.**
我在计算器抬头,卷曲在PHP不应该让服务器停机。
那么有人会告诉我为什么我可以得到一个错误500:内部服务器错误?
谢谢~~~