[PHP-users 9059] Smarty 1.5.2 の使用方法について

php-users@php.gr.jp php-users@php.gr.jp
Sat, 03 Aug 2002 11:06:48 +0900


 私の環境 REDHAT 7.2  PHP 4.2.1 (Apache モジュール版をインストール)Smarty 1.5.2

が入っています。
 任意のディレクトリー下で、例えば
/home/php/public_html/.  に

mkdir templates templates_c cache
chown nobody:nobody templates templates_c cache
chmod 700 templates templates_c cache

を作り、このtemplates 下に ex1.tpl のファイル名で
---------------- 内容 ------------------------
<html>
<head>
<title>{$title}</title>
</head>
<body>
your name is {$name}
</body></html>
-------------------------------------------------

 を作り、このテンプレートを処理するPHPスクリプトとして
/home/php/public_html/. にsmarty2.php ファイルを作成しました
---------------- 内容 ------------------------
<?php
    require_once("Smarty.class.php");
    $tpl = new Smarty;
    $title = "Example1";
    $name = "Taro";

    $tpl->assign("title",$title);
    $tpl->assign("name",$name);

    $tpl->display("ex1.tpl");
?>
---------------------------------------------

ブラウザー上で
http://192.168.0.4/~php/smarty2.php
としたところ
Config_File: Bad config file path './configs' your name is Taro

の結果になりました。ここで言っている ”Bad config file path”は
どうしたらいいのか わかりません。
 それと、templates_c/. に  ex1.tpl のタグの部分が
PHPの出力コードに置換されたものに いつ作られるのですか?

宜しくご指導 下さい。