Benutzer-621
abgemeldet
- 20 April 2006
- 744
- 64
Moin,
Habe irgendwie Probleme mit Smarty, also habe Smarty (2.6.1
auf Server mit PHP 4.4.0 (auch schon mit PHP 5.2.1 getestet) geladen und immer wenn ich unteren Code im Ordner libs testen möchte erscheint "Warning: Smarty error: unable to read resource: "index.tpl" in /var/www/web163/html/www/Smarty-2.6.18/libs/Smarty.class.php on line 1095". Scheint wohl ein allseits bekanntest Problem zu sein, bin aber über Google und Ausprobieren bisher noch nicht weitergekommen. Hoffe mal ihr könnt mir helfen
.
Inhalt: index.tpl
Habe irgendwie Probleme mit Smarty, also habe Smarty (2.6.1
PHP:
include('Smarty.class.php');
// create object
$smarty = new Smarty;
// assign some content. This would typically come from
// a database or other source, but we'll use static
// values for the purpose of this example.
$smarty->assign('name', 'george smith');
$smarty->assign('address', '45th & Harris');
// display it
$smarty->display('index.tpl');
Inhalt: index.tpl
PHP:
<html>
<head>
<title>User Info</title>
</head>
<body>
User Information:<p>
Name: {$name}<br>
Address: {$address}<br>
</body>
</html>