Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

visitante_php

[Resolvido] erro ao imprimir xml

Recommended Posts

estou usando esse codigo

 

<?php require_once('../../Connections/odebateon2008.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
	case "text":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;	
	case "long":
	case "int":
	  $theValue = ($theValue != "") ? intval($theValue) : "NULL";
	  break;
	case "double":
	  $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
	  break;
	case "date":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "defined":
	  $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
	  break;
  }
  return $theValue;
}
}

mysql_select_db($database_odebateon2008, $odebateon2008);
$query_banner_lista = "SELECT * FROM banners WHERE tipo = '1'";
$banner_lista = mysql_query($query_banner_lista, $odebateon2008) or die(mysql_error());
$row_banner_lista = mysql_fetch_assoc($banner_lista);
$totalRows_banner_lista = mysql_num_rows($banner_lista);

$banner = "<?xml version='1.0' encoding='utf-8'?>
<galeria><item texto='texto da foto1' foto='fofo.jpg' endereco='www.google.com.br'/></galeria>";
//do{
//$banner .= "";
//}while($banner = mysql_fetch_array($banner_lista));

//$banner .= "";
echo $banner;
//file_put_contents("banner1.xml", $banner1);
mysql_free_result($banner_lista);
?>

eu keria exportar ele, mas como nao gravou em arquivo, eu resolvi mandar um echo, mas nem isso ele esta fazendo...

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.