Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Neu angelegte *htm Datein werden nicht erkannt

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
Fragz
Smarty Rookie


Joined: 24 Dec 2008
Posts: 8

PostPosted: Sat Jul 28, 2012 4:26 pm    Post subject: Neu angelegte *htm Datein werden nicht erkannt Reply with quote

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
View user's profile Send private message
ovnn
Smarty Regular


Joined: 14 Apr 2010
Posts: 82
Location: Germany

PostPosted: Mon Jul 30, 2012 7:21 am    Post subject: Reply with quote

groß klein Schreibung beachtet?

alles im selben Verzeichnis wie bei der index?
Back to top
View user's profile Send private message
Fragz
Smarty Rookie


Joined: 24 Dec 2008
Posts: 8

PostPosted: Thu Aug 02, 2012 9:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
Grizzly
Smarty Pro


Joined: 15 Apr 2011
Posts: 172
Location: Germany

PostPosted: Fri Aug 03, 2012 6:29 am    Post subject: Reply with quote

Sind denn beide Dateien (customer.php und customer.htm) im selben Verzeichniss wie die index.php und index.htm?
Back to top
View user's profile Send private message Visit poster's website
Fragz
Smarty Rookie


Joined: 24 Dec 2008
Posts: 8

PostPosted: Fri Aug 03, 2012 6:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
Grizzly
Smarty Pro


Joined: 15 Apr 2011
Posts: 172
Location: Germany

PostPosted: Mon Aug 06, 2012 12:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP