|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Fragz Smarty Rookie
Joined: 24 Dec 2008 Posts: 8
|
Posted: Sat Jul 28, 2012 4:26 pm Post subject: Neu angelegte *htm Datein werden nicht erkannt |
|
|
Hallo,
Ich habe ein merkwürdiges Problem.
Ich habe eine index.php und eine index.htm, der Aufruf klappt Problemlos und mir wird der Inhalt der index.htm angeziegt.
Kopiere ich nun beide Datein und Nenne sie in customer.php bzw customer.htm um bekomme ich folgende Fehlermeldung
Quote: | Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'customer.htm'' in C:\xampp\htdocs\hosting\class\engine\sysplugins\smarty_internal_templatebase.php:127 Stack trace: #0 C:\xampp\htdocs\hosting\class\engine\sysplugins\smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('customer.htm', NULL, NULL, NULL, true) #1 C:\xampp\htdocs\hosting\acp\customer.php(10): Smarty_Internal_TemplateBase->display('customer.htm') #2 {main} thrown in C:\xampp\htdocs\hosting\class\engine\sysplugins\smarty_internal_templatebase.php on line 127 |
Normal sollte diese nicht auftauchen den der Aufruf der index.php klappt ja, die customer.php hat den gleichen Aufbau und Inhalt, eine 1:1 Kopie.
Was stimmt den dort nicht bzw wieso kann er diese nicht finden?
Inhalt der customer.php
Code: | define('ACPPATH', './');
define('EXT', substr(strrchr(__FILE__, '.'), 1));
require(ACPPATH . 'init.' . EXT);
$ACP->page_header();
$Smarty->assign(array(
));
$Smarty->display('customer.htm');
$ACP->page_footer(); |
Die Index ist gleich, bis auf das customer.htm durch index.htm ersetz ist |
|
Back to top |
|
ovnn Smarty Regular
Joined: 14 Apr 2010 Posts: 82 Location: Germany
|
Posted: Mon Jul 30, 2012 7:21 am Post subject: |
|
|
groß klein Schreibung beachtet?
alles im selben Verzeichnis wie bei der index? |
|
Back to top |
|
Fragz Smarty Rookie
Joined: 24 Dec 2008 Posts: 8
|
Posted: Thu Aug 02, 2012 9:27 pm Post subject: |
|
|
jep, alles im selben ordner, alles kleingeschrieben.
es ist auch alles gleich geblieben, bis auf die dateinamen der php und htm files |
|
Back to top |
|
Grizzly Smarty Pro
Joined: 15 Apr 2011 Posts: 172 Location: Germany
|
Posted: Fri Aug 03, 2012 6:29 am Post subject: |
|
|
Sind denn beide Dateien (customer.php und customer.htm) im selben Verzeichniss wie die index.php und index.htm? |
|
Back to top |
|
Fragz Smarty Rookie
Joined: 24 Dec 2008 Posts: 8
|
Posted: Fri Aug 03, 2012 6:01 pm Post subject: |
|
|
Nein, die php files liegen im root ordner der seite und die htm files liegen in theme.
Dementsprechend habe ich in der smarty.class.php auch folgendes geändert.
Code: | $this->setTemplateDir('.' . DS . 'theme' . DS)
->setCompileDir('.' . DS . 'cache' . DS)
->setPluginsDir(SMARTY_PLUGINS_DIR)
->setCacheDir('.' . DS . 'cache' . DS)
->setConfigDir('.' . DS . 'configs' . DS); |
Daran kann es also nicht liegen da die index.php ja funktioniert |
|
Back to top |
|
Grizzly Smarty Pro
Joined: 15 Apr 2011 Posts: 172 Location: Germany
|
Posted: Mon Aug 06, 2012 12:48 pm Post subject: |
|
|
ich meinte eigentlich ob index.php im selben verzeichnis liegt wie customer.php und ob customer.htm im selben verzeichnis liegt wie index.htm
Aber wie es aussieht ist es ja so.
Du solltest aber trotzdem nichts in der smarty-Klasse ändern. Denn um z. B. das template_dir zu ändern kannst du von deiner Smarty-Instanz einfach das template_dir bestimmen!
kannst du vllt mal den Inhalt von
require(ACPPATH . 'init.' . EXT);
schicken? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|