[PHP-users 32304] お世話になります。

Napura napura @ sky.707.to
2007年 6月 13日 (水) 15:45:30 JST


お世話になります。

smartyを初めて使用してみました。
しかし、以下のエラーが出ます。

Warning: Smarty error: unable to read resource: "hello.tpl" in /usr/
share/php/smarty/libs/Smarty.class.php on line 1095

コードは以下のように単にHello Wolrd です。

hello.php
<?php
require_once("smarty/libs/Smarty.class.php");
$o_smarty=new Smarty();
$o_smarty->template_dir="../templates/";
$o_smarty->compile_dir="../templates_c/";
$o_smarty->assign("name","World");
$o_smarty->display("hello.tpl");
?>

hello.tpl
<html>
<head>
<title>hello,world!</title>
</head>
<body>
hello, {$name}!
</body>
</html>

エラーでは、Smarty.class.phpで発生しているようなメッセージですが
よくわかりません。

アドバイスお願いいたします。



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+                                                                    +
+               Napura  < napura @ sky.707.to >                        +
+                                                                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


PHP-users メーリングリストの案内