|
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 |
Kai Smarty n00b
Joined: 11 Jun 2003 Posts: 3
|
Posted: Wed Jun 11, 2003 1:10 pm Post subject: Smarty doesn't work |
|
|
First: Sorry for my english...
I receive the following errors:
Code: |
Warning: _compile_template(smarty\Smarty_Compiler.class.php) [function.-compile-template]: failed to open stream: No such file or directory in G:\wampp2\htdocs\neu\smarty\Smarty.class.php on line 1708
Fatal error: _compile_template() [function.require]: Failed opening required 'smarty\Smarty_Compiler.class.php' (include_path='\wampp2\php\pear\') in G:\wampp2\htdocs\neu\smarty\Smarty.class.php on line 1708
|
include.php:
Code: |
<?
define(SMARTY_DIR,'smarty\\');
require(SMARTY_DIR.'Smarty.class.php');
require(SMARTY_DIR.'Smarty_Compiler.class.php');
$smarty = new Smarty;
$normdir = 'G:\wampp2\smarty\\';
$smarty->template_dir = $normdir.'templates\\';
$smarty->compile_dir = $normdir.'templates_c\\';
$smarty->config_dir = $normdir.'configs\\';
$smarty->cache_dir = $normdir.'cache\\';
$verbindung = mysql_connect("localhost","","") or die ("Keine Verbindung zum localhost moeglich, möglicherweise ist das Passwort falsch");
mysql_select_db("abi") or die ("Diese Datenbank exestiert nicht");
?>
|
index.php:
Code: |
<?
require("include.php");
error_reporting(E_ALL);
$abfragecss = mysql_query("SELECT * FROM css");
$row = mysql_fetch_array($abfragecss);
mysql_free_result($abfragecss);
$css2 = $row['link'];
$thema2 = $row['name'];
$smarty->assign('css', $css2);
$smarty->assign('clanname',$thema2);
$smarty->display('index.tpl');
?>
|
if it is relevant my php.ini:
Code: |
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
; include_path = ".;c:\"
include_path = \wampp2\php\pear\
|
index.tpl exist in G:\wampp2\smarty\templates\:
Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Willkommen zum Webauftritt der Stufe 13 des xxx</title>
{$css}
</head>
<body class="index">
<h1 class="index">Derzeitiges Thema: Mexiko</h1>
<p class="indeximg"> <img class="index" src="images/{$thema}/index.jpg" alt="Abikultur - {$thema}"/></p>
<div class="indexvalid"><a href="http://validator.w3.org/check?uri=http%3A%2F%2F62.227.134.133%2Fneu%2Findex.php"
><img src="images/valid/xthml10.jpg" class="indexvalid" alt="Diese Seite ist XHTML 1.0 strict" width="88" height="31"/></a>
<a href="http://jigsaw.w3.org/css-validator/validator?uri=http://62.227.134.133/neu/css/Mexiko.css">
<img src="images/valid/cssvalid.gif" class="indexvalid" width="88" height="31" alt="Die Seite ist CSS valid"/>
</a></div>
</body>
</html>
|
PS: my smarty folder is in G:\wampp2\smarty
with 4 subfolders:
\templates\
\templates_c\
\cache\
\configs\
i copied the libs of smarty in nearly EVERY folder, even php\pear... and pear\smarty\
Help me please... |
|
Back to top |
|
sweatje Smarty Regular
Joined: 17 Apr 2003 Posts: 70 Location: Bettendorf, Iowa, USA
|
Posted: Wed Jun 11, 2003 3:39 pm Post subject: |
|
|
I am not a win guy, but shouldn't this be
Code: | ; Windows: "\path1;\path2"
; include_path = ".;c:\"
include_path =".;g:\wampp2\php\pear\" |
_________________ Jason
jsweat_php AT yahoo DOT com |
|
Back to top |
|
Kai Smarty n00b
Joined: 11 Jun 2003 Posts: 3
|
Posted: Wed Jun 11, 2003 4:22 pm Post subject: |
|
|
The same... |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jun 11, 2003 4:46 pm Post subject: |
|
|
set SMARTY_DIR to a full path:
define(SMARTY_DIR, 'G:\\wampp2\\smarty\\');
for example
HTH
messju |
|
Back to top |
|
Kai Smarty n00b
Joined: 11 Jun 2003 Posts: 3
|
Posted: Wed Jun 11, 2003 4:59 pm Post subject: |
|
|
I found the mistake... dunno how but i found him (i only copied the libs in EVERY folder) THX @ all nice piece of work |
|
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
|