torrentz Posted December 15, 2007 Report Share Posted December 15, 2007 http://paste.php.lv/6596 man izvadās: <?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel> <title>bwap.org news</title> <description>BWap.ORG rss feed by Juris</description> <link>http://bwap.org</link> <lastBuildDate>Sat, 15 Dec 2007 14:25:21 MSK</lastBuildDate> <copyright>© BWap.ORG 2007</copyright> </channel> </rss> bet vajag: <?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel> <title>bwap.org news</title> <description>BWap.ORG rss feed by Juris</description> <link>http://bwap.org</link> <lastBuildDate>Sat, 15 Dec 2007 14:25:21 MSK</lastBuildDate> <copyright>© BWap.ORG 2007</copyright> <item><title></title> <pubDate></pubDate> <description></description> </item> un tā vēl 8 reizes.. </channel> </rss> Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 15, 2007 Report Share Posted December 15, 2007 torrentz --> mazliet sakarigak paskaidro !! a ta no ta koda vispar neko nesapratu ... kapec vietam print , a vietam echo ? piedevam print... jau pilniba noformulets teksts..... --- Ko nozime taa 8 reizes??? kas tie par N-tiem koda fragmentiem? (tava postaa) Link to comment Share on other sites More sharing options...
andrisp Posted December 15, 2007 Report Share Posted December 15, 2007 Pārbaudi vai vispār šis kverijs kaut ko atgriež: "select * from `bwap_news` order by `id` desc limit $page, $print_kol2;" Link to comment Share on other sites More sharing options...
torrentz Posted December 15, 2007 Author Report Share Posted December 15, 2007 8 reizes nozīmē, ka jāizvadās pēdējiem 8 jaunimiem... Link to comment Share on other sites More sharing options...
4e4en Posted December 15, 2007 Report Share Posted December 15, 2007 izdzēs visus @ simbolus, un pasaki, ko izvada Link to comment Share on other sites More sharing options...
torrentz Posted December 16, 2007 Author Report Share Posted December 16, 2007 noņemot @ zīmes, nekas nemainās. šeit ir pats jaunumu skripts: http://paste.php.lv/6604 Link to comment Share on other sites More sharing options...
andrisp Posted December 16, 2007 Report Share Posted December 16, 2007 Kas par kodu.... A tu pamēģināji izdarīt, ko es teicu ? Link to comment Share on other sites More sharing options...
torrentz Posted December 16, 2007 Author Report Share Posted December 16, 2007 tā ka es īsti nezinu kā lietot print_r, tad ar šo variantu man sanāca šādi: <?xml version="1.0" encoding="utf-8"?><rss version="2.0"> <channel> <title>BWap.ORG news</title> <description>rss feed script by Juris</description> <link>http://bwap.org</link> <lastBuildDate>Mon, 17 Dec 2007 01:42:29 +0300</lastBuildDate> <copyright>© BWap.ORG</copyright><item><title> .. : </title><description></description><link>http://bwap.org/news/koment.php?n=</link><pubDate> .. : </pubDate></item> </channel> </rss> Link to comment Share on other sites More sharing options...
torrentz Posted December 17, 2007 Author Report Share Posted December 17, 2007 (edited) atradu kļūdu (kverijs neko neizdeva, jo es nebiju ielicis vienu papildus include failu...) tagad viss itkā strādā, bet ir viena neliela problēma ar kodējumu: $bb='<item><title>'.$news_array['news'].'<br/>[Добавил: '.$news_array['added'].'] Комментарии ['.$num2.']'; $news=substr("$bb", 0, 45); $news2=$news.'...'.$date.'</title>'; aiz news2=$news.', kad izvadās jaunuma teksta sākums, pēdējais burts izvadās kā ķeburs un beigās iznāk, ka xml fails nav valīds... ka to novērst? Edited December 17, 2007 by torrentz Link to comment Share on other sites More sharing options...
andrisp Posted December 17, 2007 Report Share Posted December 17, 2007 Izmanto mb_substr(). Pārbaudi vai vispār šis kverijs kaut ko atgriež: "select * from `bwap_news` order by `id` desc limit $page, $print_kol2;" atradu kļūdu (kverijs neko neizdeva, jo es nebiju ielicis vienu papildus include failu...) Tā iet, ka neklausās. ;) Link to comment Share on other sites More sharing options...
torrentz Posted December 17, 2007 Author Report Share Posted December 17, 2007 mb_substr nepalīdz :( Link to comment Share on other sites More sharing options...
torrentz Posted December 17, 2007 Author Report Share Posted December 17, 2007 dziļi atvainojos andrisp! mb_substr tomēr palīdzēja! paldies! es biju aimirsis lapā ielikt mb_internal_encoding("UTF-8"); :D Link to comment Share on other sites More sharing options...
Recommended Posts