السلام عليكم
كلما حاولت أن أضع كود الأخبار مثل هذا الكود :
------------------------------------------------------------
------------------------------------------------------------كود:<? $opentype = "_blank"; $bgcolor= "#FFFFFF"; $url = "http://www.aljazeera.net/news/arabic/"; $string = implode("\n", file($url)); $string2 = explode("<!--start second News-->", $string); $string3 = explode("<!--end second News-->", $string2[1]); $news = str_replace('href="../../news/arabic/',"href=\"$url",$string3[0]); $news = str_replace('>- ',">",$news); preg_match_all("/href[[:space:]]*=[[:space:]]*"."[\"']{0,1}([^\"'> ]+)/i",$news,$arr,PREG_SET_ORDER); preg_match_all("|>([^<]*)</a|i",$news,$arr_text,PREG_SET_ORDER); echo "<span dir=rtl><marquee direction=\"right\" bgcolor=\"$bgcolor\">"; for ($i=0;$i<count($arr);$i++) if ($arr_text[$i][1]!="") echo " <font face=\"Wingdings\" color=\"#808080\">v</font> <B><a href=\"".$arr[$i][1]."\" target=\"$opentype\">".$arr_text[$i][1]."</a></B>"; echo "</marquee></span>"; ?>
تظهر هذه الرسالة :
Warning: file("http://www.aljazeera.net/news/arabic/") - Bad file descriptor in /usr/home/a/l/almagnas/public_html/news.php on line 5
Warning: Bad arguments to implode() in /usr/home/a/l/almagnas/public_html/news.php on line 5
ملاحظة:السطر الخامس هو :
أتمنى من الله أن أجد الجوابكود:$string = implode("\n", file($url));
وشكرا
alr7al



