Parse error dans mon code :/

Résolu/Fermé
Naam- - 18 juin 2008 à 10:44
 Naam- - 18 juin 2008 à 11:00
Bonjour,

j'ai un petit soucis avec mon code de mon index.php :(

Je travaille pour l'instant en local avant la production du site web, avec easyphp 2.0b1, bref une erreur s'affiche quand j'actualise ma page pour la 1ere fois :D sa commence bien.

L'erreur en question est : Parse error: parse error, unexpected $end in C:\Program Files\EasyPHP 2.0b1\www\templates\souris\index.php on line 85

On m'a dit que cela pouvais être dû à une ponctuation mais je n'arrive pas du tout à la desceller :'(

Si vous pouvier m'aider un petit peut, merci d'avance.

Voici mon code :

<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = split( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<!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>
<?php
if ( $my->id ) {
initEditor();
}
?>
<?php mosShowHead(); ?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php echo "<link rel=\"stylesheet\" href=\"$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_css.css\" type=\"text/css\"/>" ; ?>
<link rel="alternate" type="application/rss+xml" title="<?php echo $mosConfig_sitename?>" href="<?php echo $mosConfig_live_site;?>/index.php?option=com_rss&feed=RSS2.0&no_html=1" />
<!--[if lte IE 7]>
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
<body>
<div id="page_bg">
<div id="center">
<!--topmenu start-->
<div class="topmenu">
<?php include'menu.php'; ?>
</div>
<!--topmenu end-->

<!--header start-->
<div id="header">
<div id="Les souris de la villes">
<table cellspacing="0" cellpadding="0" style="width: 1000px; height: 140px; text-align: center; margin: 0 auto;">
<tr><td style="text-align: center; vertical-align: middle;">
<p><?php echo $GLOBALS['mosConfig_sitename']?></p>
</td></tr>
</table>

</div>
</div>
<!--header end-->

<!--center start-->

<div class="center">
<div id="wrapper">
<div id="content">
<!--if left or right collum start-->
<?php if ( mosCountModules( 'left' ) ) { ?>
<div id="leftmenu">
<?php mosLoadModules('left' , '-3'); ?>
<? $sg = 'banner'; include "templates.php"; ?>
</div>
<? } ?>

<?php if ( mosCountModules( 'right' ) ) { ?>
<div id="main">
<? } else { ?>
<div id="main_full">
<? } ?>
<?php mosMainBody(); ?>
</div>
<?php if ( mosCountModules( 'right' ) ) { ?>
<div id="rightmenu">
<?php mosLoadModules ( 'right' , '-3'); ?>
</div>
<? } ?>
<div class="clr"></div>
<!--if left or right collum end-->
</div>
</div>
</div>
<!--center end-->
<!--footer start-->
<div id="footer">
<p class="copyright"><? $sg = ''; include "templates.php"; ?></p>
</div>
<!--footer end-->
</div>
</div>
</body>
</html>


PS la ligne 85 correspond en regardant sous dreamweaver au </html> , c'est cela qui m'intrigue...

Merci, Bye


Naam-
A voir également:

2 réponses

Utilisateur anonyme
18 juin 2008 à 10:54
^^

essaye ça. Si ca marche pas, regarde tes </div>. Je crois qu'il y en a trop.
<?php 
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 
// needed to seperate the ISO number from the language file constant _ISO 
$iso = split( '=', _ISO ); 
// xml prolog 
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?>'; 
?> 
<!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> 
<?php 
if ( $my->id ) { 
initEditor(); 
} 
?> 
<?php mosShowHead(); ?> 
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> 
<?php echo "<link rel='stylesheet' href='$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_cs­s.css' type='text/css'/>" ; ?> 
<link rel="alternate" type="application/rss+xml" title="<?php echo $mosConfig_sitename?>" href="<?php echo $mosConfig_live_site;?>/index.php?option=com_rss&feed=RSS2.0&no_html=1" /> 
<!--[if lte IE 7]> 
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_ie.css" rel="stylesheet" type="text/css" /> 
<![endif]--> 
</head> 
<body> 
<div id="page_bg"> 
<div id="center"> 
<!--topmenu start--> 
<div class="topmenu"> 
<?php include'menu.php'; ?> 
</div> 
<!--topmenu end--> 

<!--header start--> 
<div id="header"> 
<div id="Les souris de la villes"> 
<table cellspacing="0" cellpadding="0" style="width: 1000px; height: 140px; text-align: center; margin: 0 auto;"> 
<tr><td style="text-align: center; vertical-align: middle;"> 
<p><?php echo $GLOBALS['mosConfig_sitename']?></p> 
</td></tr> 
</table> 

</div> 
</div> 
<!--header end--> 

<!--center start--> 

<div class="center"> 
<div id="wrapper"> 
<div id="content"> 
<!--if left or right collum start--> 
<?php 
if ( mosCountModules( 'left' ) ) 
{ ?> 
<div id="leftmenu"> 
<?php mosLoadModules('left' , '-3'); ?> 
<? $sg = 'banner'; include "templates.php"; ?> 
</div> 
<? } ?> 

<?php if ( mosCountModules( 'right' ) ) { ?> 
<div id="main"> 
<? } else { ?> 
<div id="main_full"> 
<? } ?> 
<?php mosMainBody(); ?> 
</div> 
<?php if ( mosCountModules( 'right' ) ) { ?> 
<div id="rightmenu"> 
<?php mosLoadModules ( 'right' , '-3'); ?> 
</div> 
<? } ?> 
<div class="clr"></div> 
<!--if left or right collum end--> 
</div> 
</div> 
</div> 
<!--center end--> 
<!--footer start--> 
<div id="footer"> 
<p class="copyright"><? $sg = ''; include "templates.php"; ?></p> 
</div> 
<!--footer end--> 
</div> 
</div> 
</body> 
</html> 
0
Merci pour cette réponse rapide :)

En essayant ton code l'erreur change ^^ c'est maintenant la ligne 88.

Je vais essayer de regarder mes </div>.

Bye =)


Naam-
0