I'm thinking it's the smarty templates setup that is preventing me from echo'ing the $setlnk variable elsewhere on the page. Or, am i'm doing something else wrong. Is there another method I could use?
<?php
$setlnk = "<img src='/files/pvtexp.php?mid=" . $set[2] . "&iid=" . $set[3] . "&idat=" . $set[4] . "/" . $set[5] . "&sec=" . $set[6] . "'>";
echo $setlnk; //开发者_开发问答 works
?>..... html code
<?=$setlnk;?> // doesn't work
<?php echo $setlnk; ?> // doesn't work
if this is a smarty template, you need to do the following:
- PHP file: $template->assign('setlnk', $setlnk); // template is the SMARTY template object
- TPL file (smarty template): {$setlnk}
精彩评论