Jump to content

XML


mates
 Share

Recommended Posts

Potřeboval bych poradit, našel jsem tady na foru několik kódů pro XML export ale ani jeden mi nefunguje a netuším čím by to mohlo být.

http://www.cerna-tecka.cz/xml/zbozi.php - píše mi to: "fatal error"

<?php
include(dirname(__FILE__).'/../config/config.inc.php');
error_reporting(0);
$p=Product::getProducts(5, 0, 0, 'id_product', 'desc', false); // cislo 3 je id ceskeho jazyka v databazi
$products=Product::getProductsProperties(5, $p); // cislo 3 je id ceskeho jazyka v databazi
header("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="utf-8"?>
';
foreach ($products as $row) {
$img=Product::getCover($row['id_product']);
echo '

'.str_replace("&", "&", $row['name']).'
'.str_replace("&", "&",strip_tags($row['description_short'])).'
http://www.cerna-tecka.cz'.$row['link'].'
http://www.cerna-tecka.cz/img/p/'.$row['id_product'].'-'.$img['id_image'].'-home.jpg
'.($row['price']*1).'
0
';
}
echo '';
?>


předem díky za odpověď

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More