You're almost as happy as you think you are.
Posts tagged dreamhost
成功安装上smartrss插件
Nov 19th
dreamhost的主机默认不支持smartrss插件,查看了国外一些解决方案,找到了以下不错的办法,特分享给大家。
I solved this error with change file() and implode() function with curl function from wp_smartrss.php.
Look at line 29 at original source code(wp_smartrss.php), you can find :
Replace with
-
if(ini_get(allow_url_fopen)){
-
}elseif(function_exists(curl_init)){
-
?$ch = curl_init();
-
$timeout = 5; // set to zero for no timeout
-
?curl_setopt ($ch, CURLOPT_URL, $filename );
-
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
-
?curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
-
$data = curl_exec($ch);
-
?curl_close($ch);
-
?}else{
-
?echo “<br />Ooops. Looks like your server supports neither <a href=\”http://us3.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen\”>url_fopen</a> nor
-
<a href=\”http://us2.php.net/manual/en/ref.curl.php\”>cURL</a>. Style information disabled.<br /><br />”;
-
?return;
-
?}
Remember ! If you have a problem with your website with error warning :
file() [function.file]: URL file-access is disabled in the server configuration in bla..bla
or implode() [function.implode]: Bad arguments. in bla..bla
Just replace that function with curl