我正在使用下面的代码
require 'Smarty/libs/Smarty.class.php';
$smarty = new Smarty;
$sel=mysql_query("select id, name from form");
$smarty->assign('contact', $db->getRow($sql));
$smarty->display('testfunction.tpl');我收到错误消息:
Fatal error: Call to a member function getRow() on a non-object in D:\xampp\htdocs\smarty\testfun.php on line 21发布于 2012-08-12 16:40:12
您尚未声明任何$db对象。改用下面的代码:
$smarty->assign('contact', mysql_fetch_row($sel));https://stackoverflow.com/questions/11920865
复制相似问题