PArse Error

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : PArse Error

Re: PArse Error

par Fre3z69 » 22 mars 2013, 06:28

Il serais pas mieux en débutant ce sujet?

Je dis ça je dis rien :roll:

Re: PArse Error

par xTG » 21 mars 2013, 21:46

C'est pareil, c'est horrible ce code...
Pourquoi utiliser des echo et ne rien mettre dedans ?
Pourquoi mettre des points virgule là où il n'y a aucune instruction ?
<?PHP if($_GET["page"]=='presentation') { ?>
<a href="./?page=presentation" class="Link_Left_Menu_On">Pr&eacute;sentation</a>
<?PHP } else { ?>
<a href="./?page=presentation" class="Link_Left_Menu">Pr&eacute;sentation</a>
<?PHP } ?>
ou
<?PHP if($_GET["page"]=='presentation') { 
  echo '<a href="./?page=presentation" class="Link_Left_Menu_On">Pr&eacute;sentation</a>';
} else {
  echo '<a href="./?page=presentation" class="Link_Left_Menu">Pr&eacute;sentation</a>';
} ?>

Re: PArse Error

par sicca » 21 mars 2013, 17:48

Mince, je n'arrive pas à modifier le sujet en [Résolu] ^^

Re: PArse Error

par sicca » 21 mars 2013, 17:47

Un ami viens de m'apporter la solution, voici la bonne syntaxe :

<link href="../css/presenta.css" rel="stylesheet" type="text/css">
<link href="../css/Typo.css" rel="stylesheet" type="text/css">
<div class="Content_Left_Menu">
<div style="margin-left:52px; float:left;">
<table width="140" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="Bg_Left_Menu">
<?PHP if($_GET["page"]=='presentation') { echo ?>
<a href="./?page=presentation" class="Link_Left_Menu_On">Pr&eacute;sentation</a>
<?PHP ; } else { echo ?>
<a href="./?page=presentation" class="Link_Left_Menu">Pr&eacute;sentation</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='entreprises') { echo ?>
<a href="./?page=entreprises" class="Link_Left_Menu_On">Entreprises</a>
<?PHP ; } else { echo ?>
<a href="./?page=entreprises" class="Link_Left_Menu">Entreprises</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='particuliers') { echo ?>
<a href="./?page=particuliers" class="Link_Left_Menu_On">Particuliers</a>
<?PHP ; } else { echo ?>
<a href="./?page=particuliers" class="Link_Left_Menu">Particuliers</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='auteurs') { echo ?>
<a href="./?page=auteurs" class="Link_Left_Menu_On">Auteurs</a>
<?PHP ; } else { echo ?>
<a href="./?page=auteurs" class="Link_Left_Menu">Auteurs</a>
<?PHP ; } ?>

</td>
</tr>
<tr>
<td class="Sub_Left_Menu">&nbsp;</td>
</tr>
</table>
</div>
<?PHP if($_GET['page']=='entreprises') { echo ?>
<div style="margin-left:52px; float:left;">
<table width="140" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="Top_Left_Content_Sub">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top" class="Left_Content_Sub">
<div style="margin-bottom:4px; padding-bottom:4px; margin-right:4px; border-bottom:dotted; border-bottom-width:1px; border-bottom-color:#cccccc">
<strong>Des services pour tous.<br />
Une solution pour chacun.</strong>
</div>
<div align="left">
<span class="Li_Left_Menu_01">Artisans</span>
<span class="Li_Left_Menu_01">Commer&ccedil;ants</span>
<span class="Li_Left_Menu_01">PME</span>
<span class="Li_Left_Menu_01">Associations</span>
<span class="Li_Left_Menu_01">Professions lib&eacute;rales</span>
<span class="Li_Left_Menu_01">Ind&eacute;pendants </span>
<span class="Li_Left_Menu_01">Etc.</span></div></td>
</tr>
<tr>
<td class="Bottom_Left_Content_Sub">&nbsp;</td>
</tr>
</table>
</div>
<?PHP ; } ?>

<?PHP if($_GET['page']=='particuliers') { echo ?>
<div style="margin-left:52px; float:left;">
<table width="140" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="Top_Left_Content_Sub">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top" class="Left_Content_Sub">
<div style="margin-bottom:4px; padding-bottom:4px; margin-right:4px; border-bottom:dotted; border-bottom-width:1px; border-bottom-color:#cccccc">
<strong>Des services pour tous.<br />
Une solution pour chacun.</strong>
</div>
<div align="left">
<span class="Li_Left_Menu_01">Etudiants</span>
<span class="Li_Left_Menu_01">Demandeurs d'emploi</span>
<span class="Li_Left_Menu_01">Actifs</span>
<span class="Li_Left_Menu_01">Retraités</span><span class="Li_Left_Menu_01">R&eacute;sidents &eacute;trangers</span><span class="Li_Left_Menu_01">Etc.</span></div></td>
</tr>
<tr>
<td class="Bottom_Left_Content_Sub">&nbsp;</td>
</tr>
</table>
</div>
<?PHP ; } ?>

<?PHP if($_GET['page']=='auteurs') { echo ?>
<div style="margin-left:52px; float:left;">
<table width="140" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="Top_Left_Content_Sub">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top" class="Left_Content_Sub">
<div style="margin-bottom:4px;">
<div style="margin-bottom:4px; padding-bottom:4px; margin-right:4px; border-bottom:dotted; border-bottom-width:1px; border-bottom-color:#cccccc">
<strong>Des services pour tous.<br />
Une solution pour chacun.</strong>
</div>
<div align="left">
<span class="Li_Left_Menu_01">Auteurs</span>
<span class="Li_Left_Menu_01">Editeurs</span>
<span class="Li_Left_Menu_01">Journalistes</span>
<span class="Li_Left_Menu_01">Etc.</span>
</div></td>
</tr>
<tr>
<td class="Bottom_Left_Content_Sub">&nbsp;</td>
</tr>
</table>
</div>
<?PHP ; } ?>
</div>

Re: PArse Error

par xTG » 21 mars 2013, 17:43

Tu as un point virgule après chaque balise <?php
Je suis fortement étonné que cela ne tique pas et ce quelle que soit la version de PHP...

Re: PArse Error

par sicca » 21 mars 2013, 17:09

Ha oui j'ai omis de préciser que ce n'était qu'une partie de code, vois la page entière :

<link href="../css/presenta.css" rel="stylesheet" type="text/css">
<link href="../css/Typo.css" rel="stylesheet" type="text/css">
<div class="Content_Left_Menu">
<div style="margin-left:52px; float:left;">
<table width="140" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="Bg_Left_Menu">
<?PHP if($_GET["page"]=='presentation') { echo ?>
<a href="./?page=presentation" class="Link_Left_Menu_On">Pr&eacute;sentation</a>
<?PHP ; } else { echo ?>
<a href="./?page=presentation" class="Link_Left_Menu">Pr&eacute;sentation</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='entreprises') { echo ?>
<a href="./?page=entreprises" class="Link_Left_Menu_On">Entreprises</a>
<?PHP ; } else { echo ?>
<a href="./?page=entreprises" class="Link_Left_Menu">Entreprises</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='particuliers') { echo ?>
<a href="./?page=particuliers" class="Link_Left_Menu_On">Particuliers</a>
<?PHP ; } else { echo ?>
<a href="./?page=particuliers" class="Link_Left_Menu">Particuliers</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='auteurs') { echo ?>
<a href="./?page=auteurs" class="Link_Left_Menu_On">Auteurs</a>
<?PHP ; } else { echo ?>
<a href="./?page=auteurs" class="Link_Left_Menu">Auteurs</a>
<?PHP ; } ?>

</td>
</tr>
<tr>
<td class="Sub_Left_Menu">&nbsp;</td>
</tr>
</table>
</div>
<?PHP if($_GET['page']=='entreprises') { echo ?>
<div style="margin-left:52px; float:left;">
<table width="140" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="Top_Left_Content_Sub">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top" class="Left_Content_Sub">
<div style="margin-bottom:4px; padding-bottom:4px; margin-right:4px; border-bottom:dotted; border-bottom-width:1px; border-bottom-color:#cccccc">
<strong>Des services pour tous.<br />
Une solution pour chacun.</strong>
</div>
<div align="left">
<span class="Li_Left_Menu_01">Artisans</span>
<span class="Li_Left_Menu_01">Commer&ccedil;ants</span>
<span class="Li_Left_Menu_01">PME</span>
<span class="Li_Left_Menu_01">Associations</span>
<span class="Li_Left_Menu_01">Professions lib&eacute;rales</span>
<span class="Li_Left_Menu_01">Ind&eacute;pendants </span>
<span class="Li_Left_Menu_01">Etc.</span></div></td>
</tr>
<tr>
<td class="Bottom_Left_Content_Sub">&nbsp;</td>
</tr>
</table>
</div>
<?PHP ; } ?>

<?PHP if($_GET['page']=='particuliers') { echo ?>
<div style="margin-left:52px; float:left;">
<table width="140" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="Top_Left_Content_Sub">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top" class="Left_Content_Sub">
<div style="margin-bottom:4px; padding-bottom:4px; margin-right:4px; border-bottom:dotted; border-bottom-width:1px; border-bottom-color:#cccccc">
<strong>Des services pour tous.<br />
Une solution pour chacun.</strong>
</div>
<div align="left">
<span class="Li_Left_Menu_01">Etudiants</span>
<span class="Li_Left_Menu_01">Demandeurs d'emploi</span>
<span class="Li_Left_Menu_01">Actifs</span>
<span class="Li_Left_Menu_01">Retraités</span><span class="Li_Left_Menu_01">R&eacute;sidents &eacute;trangers</span><span class="Li_Left_Menu_01">Etc.</span></div></td>
</tr>
<tr>
<td class="Bottom_Left_Content_Sub">&nbsp;</td>
</tr>
</table>
</div>
<?PHP ; } ?>

<?PHP if($_GET['page']=='auteurs') { echo ?>
<div style="margin-left:52px; float:left;">
<table width="140" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="Top_Left_Content_Sub">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top" class="Left_Content_Sub">
<div style="margin-bottom:4px;">
<div style="margin-bottom:4px; padding-bottom:4px; margin-right:4px; border-bottom:dotted; border-bottom-width:1px; border-bottom-color:#cccccc">
<strong>Des services pour tous.<br />
Une solution pour chacun.</strong>
</div>
<div align="left">
<span class="Li_Left_Menu_01">Auteurs</span>
<span class="Li_Left_Menu_01">Editeurs</span>
<span class="Li_Left_Menu_01">Journalistes</span>
<span class="Li_Left_Menu_01">Etc.</span>
</div></td>
</tr>
<tr>
<td class="Bottom_Left_Content_Sub">&nbsp;</td>
</tr>
</table>
</div>
<?PHP ; } ?>
</div>

Re: PArse Error

par [Compte supprime] » 21 mars 2013, 16:33

Bonjour,

Je ne trouve pas de balise de fin pour le <table>

PArse Error

par sicca » 21 mars 2013, 15:43

Bonjour à tous,

J'ai une erreur parse error sur cette partie de fichier depuis que je suis passé sur un nouveau serveur avec la dernière version de PHP merci pour votre aide :

<table width="140" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="Bg_Left_Menu">
<?PHP if($_GET["page"]=='presentation') { echo ?>
<a href="./?page=presentation" class="Link_Left_Menu_On">Pr&eacute;sentation</a>
<?PHP ; } else { echo ?>
<a href="./?page=presentation" class="Link_Left_Menu">Pr&eacute;sentation</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='entreprises') { echo ?>
<a href="./?page=entreprises" class="Link_Left_Menu_On">Entreprises</a>
<?PHP ; } else { echo ?>
<a href="./?page=entreprises" class="Link_Left_Menu">Entreprises</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='particuliers') { echo ?>
<a href="./?page=particuliers" class="Link_Left_Menu_On">Particuliers</a>
<?PHP ; } else { echo ?>
<a href="./?page=particuliers" class="Link_Left_Menu">Particuliers</a>
<?PHP ; } ?>

<?PHP if($_GET['page']=='auteurs') { echo ?>
<a href="./?page=auteurs" class="Link_Left_Menu_On">Auteurs</a>
<?PHP ; } else { echo ?>
<a href="./?page=auteurs" class="Link_Left_Menu">Auteurs</a>
<?PHP ; } ?>