[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 06/08 11:25 / Filesize : 245 KB / Number-of Response : 924
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

【PHP】 Smarty 隔離スレ 【テンプレート】



146 名前:nobodyさん [2008/07/21(月) 01:40:20 ID:8uak49aQ]
■ MySmarty.class.php
<?php
require_once("Smarty/Smarty.class.php");

classMySmartyextendsSmarty {

publicfunction__construct() {
$this->Smarty();
$this->template_dir="./data/templates";
$this->compile_dir="./data/templates_c";
}

}
?>

■ test.php(MySmarty.class.php と同じディレクトリ) → 正常に動作
<?php
require_once( './MySmarty.class.php' );
$o_smarty = new MySmarty();
$o_smarty->display( "main.tpl" );
?>

■ dir.php(MySmarty.class.php の直下のフォルダ) → エラー
Warning: Smarty error: unable to read resource: "main.tpl" in C:\hoge\Smarty\Smarty.class.php on line 1092

<?php
require_once( '../MySmarty.class.php' );
$o_smarty = new MySmarty();
$o_smarty->display( "main.tpl" );
?>

これは仕様なの?






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<245KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef