Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Smarty und template dir außerhalb des server roots

Empfohlene Antworten

Veröffentlicht

Irgendwie bin ich glaub ich grad nen bisschen doof.

Ich hab folgende Verzeichnisstruktur:


/testserver (Server-Root)

- main

-- includes

--- pageHeader.php

--- pageFooter.php

-- index.php

- lib

-- smarty

--- libs

---- Smarty.class.php

- templates

-- page-layout.tpl

- templates_c

pageHeader.php:

...

$rootPath = realpath('../');

define('TEMPLATES_PATH', $rootPath . '/lib/templates/');

define('TEMPLATES_C_PATH', $rootPath . '/lib/templates_c/');


$smarty = new Smarty();

...

pageFooter.php:

...

$smarty->display('page-layout.tpl');

...

Prinzipiell ist der Pfad der template datei nun /testserver/lib/templates/page-layout.tpl smarty sollte suchen in: /testserver/lib/templates/ Ich bekomme aber nun trotzdem beim aufruf von index.php den folgenden fehler:

Warning: Smarty error: unable to read resource: "page-layout.tpl" in /srv/www/webnauts_net/testserver/lib/smarty/libs/Smarty.class.php on line 1095

Bin euch für jede Idee dankbar... ich find einfach das Prob nicht ...

mfg

Eth

Hi,

du musst Smarty auch deine Constanten mitteilen..

$smarty->template_dir = '/web/www.example.com/smarty/guestbook/templates/';

$smarty->compile_dir = '/web/www.example.com/smarty/guestbook/templates_c/';

$smarty->config_dir = '/web/www.example.com/smarty/guestbook/configs/';

$smarty->cache_dir = '/web/www.example.com/smarty/guestbook/cache/';

Gruß,

Markus

http://smarty.php.net/manual/en/installing.smarty.basic.php

mach ich doch:

define('TEMPLATES_PATH', $rootPath . '/lib/templates/');

define('TEMPLATES_C_PATH', $rootPath . '/lib/templates_c/');

Du definierst zwar diese Konstanten, weisst sie aber Smarty nicht zu...

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.