autocharset( $teststring ,'utf8','utf8'); $testid = !empty($_GET['testid']) ? intval($_GET['testid']) : 0; //所有参数使用$_GET获取; $test = array(); $navtitle = lang('title1'); //定义模板的title内容; if ($testid) $test = C::t('test') -> fetch($testid); //读取一条数据; /*//如果不在应用内部调用需要改成如下的方式 $test=C::t('#test#test')->fetch($testid); //#test#为此应用所在的目录 */ /*如果class/table/table_test.php不存在,也可以使用如下的方法来读取; $test=DB::fetch_first("select * from %t where testid = %d ",array('test',$testid)); */ include template('index'); //调用./template/test.htm模板; /*//调用./template/sub/demo.htm 模板,按下面的方式; include template('sub/demo'); /*