Zum Inhalt springen

Php files includen - Problem bei rel. Pfaden

Erstellt am 12. September 2007 · 4 Antworten · letzte Antwort am 13. September 2007

Tags: Frage

tiomio ·

Hallo Forum!

Ich möchte ein php file einbinden mit ...

marks{
   ICONS = RECORDS
   ICONS {
     tables = tt_content
     source = 15
     dontCheckPid = 1
   }
   }

Ich habe die Ext. php page content installiert.
Als Seiteninhalt wähle ich dann php Script aus. Der Inhalt dieses Scripts ist
<?php
include('fileadmin/php_files/icons.php');
?>

Leider bekomme ich auf diese Weise immer diese Fehlermeldung.

failed to open stream: No such file or directory in ...typo3conf/ext/page_php_content/pi1/class.tx_pagephpcontent_pi1.php(55) : eval()'d code on line 2

Nehme ich den absoluten Pfad funktioniert der Include.
Ich habe aber auf verschiedenen anderen Seiten gesehen dass eigentlich überall der relative Pfad genommen wird. Also muss es ein Fehler in meinen Einstellungen sein. Nur welcher ??

tiomio ·

Habe leider immer noch keine Lösung gefunden, darum probier ich es nochmal hier:

Hier mein Template:

config {
	doctype = xhtml_trans
	xmlprologue = none
	xhtml_cleaning = all
	no_cache = 0
	admPanel = 0
	removeDefaultJS = 1
	index_enable = 1
	
}


page = PAGE
page.typeNum = 0
page.stylesheet = fileadmin/stylesheet/standart.css
page.20 = TEMPLATE
page.20 {
template = FILE
template.file = fileadmin/template/standard.html
workOnSubpart = DOCUMENT_BODY
subparts.inh< styles.content.get
subparts.cr_inh < styles.content.getRight

marks {
  FLASH < plugin.tx_rbflashobject_pi1
  FLASH.tsMode = 1
  FLASH.altContent < temp.menu_1
  FLASH.ts_content {
  flashmovie = fileadmin/flash/flash.swf
  width = 1000
  height = 245  
  additionalparams (
  wmode | transparent
  )
}
  }



marks{
   ICONS = PHP_SCRIPT_EXT 
   ICONS {
    file = fileadmin/php/icons.php
   }
   }
}

Das Problem ist der letzte Teil.
Will ich icons.php einbinden bekomme ich den Fehler:

main(fileadmin/php/index.php) [function.main]: failed to open stream: No such file or directory in ...typo3/sysext/cms/tslib/index_ts.php on line 504

Warning: main() [function.include]: Failed opening 'fileadmin/php/index.php' for inclusion (include_path='/usr/share/php') in ...typo3/sysext/cms/tslib/index_ts.php on line 50

Ich habe auch die Extension "LumoNet PHP Include" installiert. Mit dem Ergebnis dass auch da das php file nicht nicht gefunden wird.

Vielleicht kann mir doch jemand helfen.

tiomio ·

Hallo!

Hat leider auch nicht funktioniert.
Komisch ist auch, wenn ich einen Pfad angebe wie fileadmin/php/index1.php, also ein file das sicher nicht besteht, kommt gar keine Fehlermeldung aber es wird auch nichts angezeigt.