参考サイト
http://playing-engineer.com/wordpress/2010/03/14/htmltemplate-for-php/
http://nora01.blog.so-net.ne.jp/2013-05-11
上記でダウンロードし、{val a/title}
と書いたら$aの中のキーであるtitleの中身が表示されるようにしたいです。
以下のように書きましたが、結果は何も出力されません。
どこが間違っているのでしょうか。
<?php require_once 'htmltemplate.inc'; $a = [ 'test' => 1, 'test1' => 2, 'title' => 3, ]; htmltemplate::t_include('sample.html', $a); // テンプレート表示 exit();
<!DOCTYPE html> <html lang="en"> <head> <title>Document</title> </head> <body> {val a/title} </body> </html>
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/29 22:45
2018/04/30 01:53
退会済みユーザー
2018/04/30 03:10
2018/04/30 04:03
2018/04/30 04:07
2018/04/30 04:44