<td width="35%" class="lcbodt lcbodr">&nbsp;<{$notbyreason}></td>在html中用;<{$notbyreason}>直接显示数据库中的值,大致需要哪些步骤,具体在php文件和sql文件中应该有哪些操作!

解决方案 »

  1.   

    先获得数据库的值,
    然后读取获得的值得到$notbyreason的值
    然后在输出$notbyrenson如果你的以上所有操作都在一个页面,那你就
    用段落输出(heredoc)的方式说出,然后你的上面那句就起效了如果你的以上获得的值和输出的不再一个页面,那就要看你用什么模板输出了···
      

  2.   

    不在一个页面,分在3个页面
    ,查询数据库,在php中把查出来的数据复制给一个数组,到这里我都会,就是这个php文件如何直接在html中用$notbyreason 一个值的形式输出啊!
      

  3.   

    用段落输出(heredoc)的方式说出这个是什么东西
      

  4.   

    看看smarty的第一章 就知道怎么弄了
      

  5.   

    要是比较小的话,就直接POST传递就好
      

  6.   

    [Thu Dec 23 15:02:04 2010] [error] [client 10.103.33.164] PHP Fatal error:  Smarty error: [in loans/detail-tmpl.html line 124]: syntax error: unrecognized tag 'date1' (Smarty_Compiler.class.php, line 590) in /data/www/html/testtrust/prog/libs/smarty/Smarty.class.php on line 1093, referer: http://www.testrust.com/member/loans.php?f=list_loansmarty里面的这个文件应该不用改吧
      

  7.   


    include("smarty_inc.php"); 
    $value="i am now learning php100";
    $smarty->assign('name',$value);  //将值传递-模板
    $smarty->display("index.htm");  //引用的模板[code=PHP
    <?php
    /*
     * Created on 2007-5-14
     * Programmer : Alan , Msn - [email protected]
     * PHP100.com Develop a project PHP - MySQL - Apache
     * Window - Preferences - PHPeclipse - PHP - Code Templates
     */ include_once('Smarty/Smarty.class.php'); //包含smarty类文件 //******************
       $smarty = new smarty();                                   //建立smarty实例对象$smarty   $smarty->config_dir   = "Smarty/Config_File.class.php";                    //目录变量
       $smarty->caching      = false;           //是否使用缓存、项目在调用期间、建议不要打开
       $smarty->template_dir = './templates/'.$smartytpl;           //设置模板目录
       $smarty->compile_dir  = './templates_c/';               //设置编译目录
       $smarty->cache_dir    = './smarty_cache/';                 //缓存文件
       /*
        * 左右边界符合 默认为{} 但实际当中会与JavaScript冲突 
        */
       $smarty->left_delimiter = "{";
       $smarty->right_delimiter = "}";
     //******************?>code]
    {$name|capitalize//参考一下吧 想从数据库中读出数据  连接数据库 怎么操作都行  随便你 、、、、
      

  8.   

                $opts = array( 'id' => $id );
                $res = $this->db_loan->get_loan_profile($opts, $this->cache);
                $opts = array( 'loan_id' => $res['id'] );
                $list = $this->db_loan_history->get_loan_history_list($opts, $this->cache);
                $res = $list;
               var_dump($res); var_dump($list);
                $template = "loans/detail-tmpl.html";
                $smarty->display($template, $res,$res1, $this->expires);
    但是现在我有2个表的数据要付给¥res这样应该如何操作‘