[phpBB Debug] PHP Warning: in file [ROOT]/ext/tas2580/seourls/event/listener.php on line 213: Undefined array key "FORUM_NAME"
REDAXO Forum • unexpected end of file
Seite 1 von 1

unexpected end of file

Verfasst: 7. Jul 2017, 08:24
von simonsinus
Hallo,

ich habe mich jetzt auch mal mit Redaxo 5 angefreundet.

Nun habe ich folgendes Problem. Ich habe hier ein Modul von REX 4 und jetzt kommt da die
Fehlermeldung "unexpected end of file". Jetzt steh ich da irgendwo auf dem Schlauch.

Gibt es denn auch ein Cheat Sheet. Speziell was den Objektzugriff betrifft.

Code: Alles auswählen

<?php 
if(REX_MEDIA[1]!="") {
$medium = rex_media::get('REX_MEDIA[1]');
}
if(REX_MEDIA[2]!="") {
$medium = rex_media::get('REX_MEDIA[2]');
}
$title = ' ';
?>
<?php if ("REX_MEDIA[1]"!="") { ?>
<div class="content" id="contentREX_SLICE_ID" style="background-image:url(./media/REX_MEDIA[1]);">
<img src="./media/blank.png" alt="blank" class="blank" />
<? } else if ("REX_MEDIA[2]"!="") { ?>
<div class="content" id="contentREX_SLICE_ID">
<div class="bg-image">
<img src="./media/REX_MEDIA[1]" alt ="<?php echo $title; ?>" />
</div>
<? } else { ?>
<div class="content" id="contentREX_SLICE_ID">
<? } ?>

<?php if ("REX_VALUE[1]"!="") { ?> 
	<div>
  REX_VALUE[id=1 output=html]
  </div>
<?php } ?>
</div>


Re: unexpected end of file

Verfasst: 7. Jul 2017, 11:05
von darwin
HI...
da feht eine } am Ende Und n paar leerzeichen täten dem sicherlich auch gut ;) ... oder schreib halt gleich alles in PHP:

Code: Alles auswählen

<?php 
if("REX_MEDIA[1]" != "") {
  $medium = rex_media::get("REX_MEDIA[1]");
}
if("REX_MEDIA[2]" != "") {
  $medium = rex_media::get("REX_MEDIA[2]");
}
$title = ' ';
if ("REX_MEDIA[1]" != "") {
  echo '<div class="content" id="contentREX_SLICE_ID" style="background-image:url(./media/REX_MEDIA[1]);">';
}?>
grz. Chris