php - CMS: Extra content at the end of the document at feed -
i've have issues feed of cms , i'm scratching problem every time didn't solve good.
i have vps cms , when make php queries connection phpscript fill tables, xml of feed gets crazy , stops working properly, thing if latest new post php queries integrated in template, rss feed starts malfunction. if it's second or next ones, rss works without problem.
could me solve problem phpissue? think it's because query overlapping on rssor that. much
the url of feed : http://heroeswar.es/feed/
the problem can see in next one:
this page contains following errors: error on line 380 @ column 71: content @ end of document below rendering of page first error. nginx error log queries: 2015/05/11 17:28:08 [error] 4101#0: *6758 fastcgi sent in stderr: "php message: php fatal error: cannot redeclare dbconect() (previously declared in .../dbfunctions.php:7) in .../dbfunctions.php on line 14" while reading response header upstream, client: 84.123.182.185, server: heroeswar.es, request: "get /feed/ http/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "heroeswar.es" php code:
<?php $dbservername = "***"; $dbusername = "***"; $dbpassword = "***"; function dbconect(){ $dbservername = "***"; $dbusername = "***"; $dbpassword = "***"; $dbcon = mysql_connect($dbservername,$dbusername,$dbpassword); mysql_select_db('hots_heroes',$dbcon) or die('no se pudo seleccionar la base de datos'); mysql_set_charset('utf8',$dbcon); return $dbcon; } function drawrotacion($heroesnamearray){ $bdcon = dbconect(); echo('<table class="guidestable" align="center">'); echo('<tbody>'); echo('<tr>'); foreach($heroesnamearray $heroename){ $heroeinfoarray = getheroeinfobyname($heroename); echo'<td><a title='.$heroeinfoarray[heroename].'href="'.$heroeinfoarray[pagelink].'"><img src="'.$heroeinfoarray[infoboximagelink].'" width="110" height="110" /></a> </td>'; } echo('</tr> <tr> '); foreach($heroesnamearray $heroename2){ $heroeinfoarray2 = getheroeinfobyname($heroename2); echo'<td style="text-align: center"><a href="'.$heroeinfoarray2[guidelink].'">guia '.$heroeinfoarray2[heroename].'</a></td>'; } echo(' </tr> </tbody> </table>'); } ?>
Comments
Post a Comment