刚接触PHP,很多东西不懂,看的我头只大
1.$templates['contents_header'] = '
        <table class="maintable">
                <tr>
                        <th>{l_FAQ}</th>
                </tr>
                <tr>
                        <td id="faq-contents">
';

['contents_header']是templates的参数吗? {l_FAQ}是个什么东东,是全局变量吗?

解决方案 »

  1.   

    你这是一个模板 $templates['contents_header']应该是引用模板类产生的一个变量
    {l_FAQ}是替换内容的标志位
      

  2.   

    contents_header 是数组 $templates的键,{l_FAQ}应该是个标签,用来替换的,PHP里面没有这个的
      

  3.   

    {l_FAQ}是模板语言,用于替换操作:$templates['contents_header']$templates是超全局变量,'contents_header'表明这个超全局变量中的头文件内容为:'
    <table class="maintable">
                        <tr>
                                <th>{l_FAQ}</th>
                        </tr>
                        <tr>
                                <td id="faq-contents">'
      

  4.   

    你那应该是模板语法,并不是PHP的语法。
      

  5.   

    $templates是变量表达式。如果templates变量的值是数组,$templates['contents_header']表示变量数组中索引名为'contents_header'的元素。