Forum Moderators: coopster

Message Too Old, No Replies

Parsing error - eval()

Parsing error in WP using Exec-php plugin

         

greenmouse

10:04 pm on Jan 12, 2012 (gmt 0)

10+ Year Member



Hello, I tried to create simple post template in WP using php with Exec-php plugin. Unfortunatelly I´m not php guru, so some error is in my code and I still get this parsing error:

Parse error: syntax error, unexpected ‘?’ in /home/free/ic.cz/w/www-hodinky-guess/root/www/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 2


In according to this message there´s probably issue with mixing html and php tags but though I look at it for hours I cannot find where is the problem. One thing is little bit confusing for me - parsing error is showing on home page but when displaying post everything is OK. So I thought for a while that problem is either in index.php or single.php from wp theme. But I didn´t find anything strange.

So could someone take a look on my code and tell me where I made mistake? Thanks in advance.

<div class="hlavicka">
<div class="head-vlevo"><img class="uvodni" title="<?php echo get_post_meta(get_the_ID(), 'komplet', true); ?>" src="<?php echo get_post_meta(get_the_ID(), 'imgurl', true); ?><?php include (ABSPATH . 'php/str_komplet.php'); ?>.jpg" height="250px" alt="<?php echo get_post_meta(get_the_ID(), 'komplet', true); ?>" /></div>
<div class="head-vpravo">
<table class="tabulka">
<tbody>
<tr>
<td style="text-align:left; width:74%;">Běžná cena:</td>
<td style="text-align:right; width:25%; font-weight:bold;"><?php echo get_post_meta(get_the_ID(), 'cena', true); ?></td>
</tr>
<tr>
<td style="text-align:left; width:74%;">Nyní:</td>
<td style="text-align:right; width:25%; font-weight:bold;"><a href="<?php include (ABSPATH . 'php/url.php'); ?><?php include (ABSPATH . 'php/str_komplet.php'); ?><?php include (ABSPATH . 'php/html.php'); ?><?php include (ABSPATH . 'php/id.php'); ?>" target="_blank"><?php echo get_post_meta(get_the_ID(), 'akce', true); ?></a></td>
</tr>
<tr>
<td style="text-align:left; width:74%;">Dostupnost:</td>
<td style="text-align:right; width:25%; font-weight:bold;">1-2 dny</td>
</tr>
<tr>
<td style="text-align:left; width:74%;">Sekce:</td>
<td style="text-align:right; width:25%; font-weight:bold;">Módní hodinky</td>
</tr>
<tr>
<td style="text-align:left; width:74%;">Značka:</td>
<td style="text-align:right; width:25%; font-weight:bold;"><a href="<?php include (ABSPATH . 'php/url.php'); ?><?php include (ABSPATH . 'php/str_znacka.php'); ?><?php include (ABSPATH . 'php/id.php'); ?>" target="_blank"><?php echo get_post_meta(get_the_ID(), 'znacka', true); ?></a></td>
</tr>
<tr>
<th colspan="2"></th>
</tr>
</tbody>
</table>
<div class="odkazy"><a class="more-link" href="<?php include (ABSPATH . 'php/url.php'); ?><?php include (ABSPATH . 'php/str_komplet.php'); ?><?php include (ABSPATH . 'php/html.php'); ?><?php include (ABSPATH . 'php/id.php'); ?>" target="_blank">Detail zboží</a><!--more-->
<a id="vetsi" class="more-link" title="<?php echo get_post_meta(get_the_ID(), 'komplet', true); ?>" href="<?php echo get_post_meta(get_the_ID(), 'imgurl', true); ?><?php include (ABSPATH . 'php/str_komplet.php'); ?>.jpg" rel="lightbox">Zvětšit obrázek</a></div>
</div>
</div>

<div class="clear"></div>

<div class="clear2"></div>


<div>
<div class="popis">
<h4 class="popis-zbozi"><span class="popisek">Stručný popis výrobku</span></h4>
<?php echo get_post_meta(get_the_ID(), 'popis', true); ?>
</div>
<a href="<?php include (ABSPATH . 'php/url.php'); ?><?php include (ABSPATH . 'php/str_komplet.php'); ?><?php include (ABSPATH . 'php/html.php'); ?><?php include (ABSPATH . 'php/id.php'); ?>" target="_blank">parametry hodinek <?php echo get_post_meta(get_the_ID(), 'komplet', true); ?></a>
</div>
<div class="clear"></div>

<div class="clear2"></div>

<div class="odkazy2"><a class="more-link" href="<?php include (ABSPATH . 'php/url.php'); ?><?php include (ABSPATH . 'php/str_komplet.php'); ?><?php include (ABSPATH . 'php/html.php'); ?><?php include (ABSPATH . 'php/id.php'); ?>" target="_blank">Koupit hodinky <?php echo get_post_meta(get_the_ID(), 'komplet', true); ?> v eshopu <?php include (ABSPATH . 'php/eshop.php'); ?></a></div>
<?php include (ABSPATH . 'php/str_znacka_konec.php'); ?>

eelixduppy

5:36 pm on Jan 13, 2012 (gmt 0)



Hello and Welcome to WebmasterWorld

I cannot see where this particular error is coming from in this source code, but some of the includes you have in there lead me to believe that something isn't being done correctly here. What are you actually including from these files?

str_komplet.php
id.php
eshop.php

etc...

My guess is that your error is within one of these included files.