![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
相关问题
index.php:
require('Smarty.class.php');
$smarty = new Smarty;
$smarty->display('index.tpl');
index.tpl:
{html_image file="pumpkin.jpg"}
{html_image file="/path/from/docroot/pumpkin.jpg"}
{html_image file="../path/relative/to/currdir/pumpkin.jpg"}
我想在上例中把{html_image file="/path/from/docroot/pumpkin.jpg"}
里面的pumpkin.jpg换成一个已经在index.php中定义好的参数如$productname[pro],应该怎么加进去。我试过
{html_image file="/path/from/docroot/{$productname[pro]}"}不行。请问格式应该是怎样的呢。
提问者:uohyde 08-13 18:06
答复

