Simpleplie - Je deviens fou!

Galagala -  
 Galagala -
Bonjour,

Salut a tous,

J'essaye depuis quelque temps d'intégrer une feed du site Franceantilles.
J'ai suivi les étapes 1,2,3,4 trouvable ici http://simplepie.org/wiki/setup/setup
néanmoins je me retrouve avec seulement cela sur ma page:

< ?php // This shows where simple pie is located simplepie.inc. require_once('php/simplepie.inc'); // Your Feed Address $feed = new SimplePie('http://www.martinique.franceantilles.fr/rss/lea_Une.xml'); $feed->handle_content_type(); ?> < ?php foreach ($feed->get_items() as $item): ?>
< ?php echo $item->get_title(); ?>

< ?php echo $item->get_description(); ?>

Posted on < ?php echo $item->get_date('j F Y | g:i a'); ?>
< ?php endforeach; ?>

Voila le code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Feed</title>
</head>
< ?php

// This shows where simple pie is located simplepie.inc.
require_once('php/simplepie.inc');

// Your Feed Address
$feed = new SimplePie('http://www.martinique.franceantilles.fr/rss/lea_Une.xml');

$feed->handle_content_type();

?>

< ?php foreach ($feed->get_items() as $item): ?>

<h2>
<a href="<?php echo $item->get_permalink(); ?>">
< ?php echo $item->get_title(); ?></a>
</h2>
<p>< ?php echo $item->get_description(); ?></p>
<p><small>Posted on < ?php echo $item->get_date('j F Y | g:i a'); ?>
</small></p>

< ?php endforeach; ?>

Merci a tous car je vois pas mon erreur

2 réponses

le père
 
Bonjour

Il ne faut pas d'espace entre < et ? dans la balise <?php
0
Galagala
 
Merci mon pere mais meme avec ca, j'ai toujours une erreur.

Voila le code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Feed</title>
</head>
<?php

// This shows where simple pie is located simplepie.inc.
require_once('php/simplepie.inc');

// Your Feed Address
$feed = new SimplePie('http://www.martinique.franceantilles.fr/rss/lea_Une.xml');

$feed->handle_content_type();

?>

<?php foreach ($feed->get_items() as $item): ?>

<h2>
<a href="<?php echo $item->get_permalink(); ?>">
<?php echo $item->get_title(); ?></a>
</h2>
<p><?php echo $item->get_description(); ?></p>
<p><small>Posted on <?php echo $item->get_date('j F Y | g:i a'); ?>

</small></p>

<?php endforeach; ?>

Merci mon pere
0
Galagala
 
C'est resolu....ma page etait en .html....N00b ...
0