[PHP-users 17264]Re: Smatyがうまく動作しない。

Katsuo Mogi mogi-k2 @ msg.biglobe.ne.jp
2003年 8月 10日 (日) 09:51:16 JST


茂木です。
お世話になっています。

In the message [PHP-users 17259] Smatyがうまく動作しない。
               <20030808215303.554B.MAO @ nextyle.com>
MAO <mao @ nextyle.com> wrote:
> <?php
> 	require('Smarty.class.php');
> 	$smarty = new Smarty;
> 	$smarty->template_dir = '/home/www/httpd/html/templates';
> 	$smarty->compile_dir = '/home/www/httpd/html/templates_c';
> 	$smarty->config_dir = '/home/www/httpd/html/configs';
> 	$smarty->cache_dir = '/home/www/httpd/html/cache';
> 	$TMPL = 'test.tpl';
> 	$smarty->display($TMPL);
> ?>

> にしたところ、
> Warning: Smarty error: unable to read template resource: "test.tpl"
> in /usr/local/lib/php/Smarty/Smarty.class.php on line 1042

> と、エラーがでて、テンプレートが読み込めず実行ができません。

自分もsmartyには大変お世話になっている一人です。
smartyのマニュアルでは、template_dir等の指定で末尾に/ がついていますが、
これは省略しても構わないようですね。(確認済み)
全て正しいように見受けられますが、なぜ実行できないんでしょう。

解決策になってなくてすいません。
こちらは
Windows2000 pro
PHP4.3.2 CGI
IIS5
です。

--
---------------------------------
 茂木克夫
    mogi-k2 @ msg.biglobe.ne.jp
---------------------------------


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