天空是藍色的

          做好軟件為中國 #gcc -c helloworld.c -o helloworld.o //編譯目標(biāo)文件 #gcc helloworld.o -o helloworld //編譯成可執(zhí)行exe #helloworld //運行exe
          數(shù)據(jù)加載中……
          smarty循環(huán)array-map顯示
          y.html 模板文件
                              <ul>
                              {{{section name=item loop=$menu_item}}}
                                  
          <li><href="{{{$menu_item[item][0]}}}">{{{$menu_item[item][1]}}}</a></li>
                              {{{/section}}}
                              
                                  
          <!--
                                  格式
                                       <li><a href="#">Index</a></li>
                                      <li><a href="#">Selected Content</a></li>
                                      <li><a href="#">Guestbook</a></li>
                                      <li><a href="#">Toggle Sidebar</a></li>
                                      <li><a href="#">Login</a></li>
                                  
          -->
                              
          </ul>

          head.php
          <?php

          require 'lib/Smarty-2.6.11/libs/Smarty.class.php';

          $smarty = new Smarty;

          //$smarty->compile_check = true;
          //$smarty->debugging = true;

          $smarty->left_delimiter = "{{{"
          $smarty->right_delimiter = "}}}"

          $site_title ="中文";
          ?>
          ini.php
          <?php
          define('SITE_TITLE','中文');
          define('SITE_LINK','');
          define('AUTHER','bluesky');
          define('BABY','');
          define('WATCH','');
          define('BLOG_TITLE','HELLOWORLD,BLOG');
          define('BLOG_INDEX_LINK','HTTP://localhost:88/yy/xy.php');
          ?>

          xy.php
          <?php

          //echo dirname(__FILE__);

          require 'head.php';
          require 'ini.php';

          $page = 'y.html';
          define('PAGE_TITLE','中國');
          $smarty->assign('site_title',SITE_TITLE);
          $smarty->assign('page_title',PAGE_TITLE);
          $smarty->assign('blog_title',BLOG_TITLE);
          $smarty->assign('blog_index_link',BLOG_INDEX_LINK);

          $href = array();
          $value = array();
          $href[1= 'index.php'$value[1= '首頁';
          $href[2= 'guest.php'$value[2= '留言本';
          $href[3= 'about.php'$value[3= '關(guān)于';
          $href[4= 'link.php';  $value[4= '鏈接';


          $map = array_map(null,$href,$value);

          for($index=0;$index<count($c);$index++){
              
          //echo "<a href=".$c[$index][0].">";
              //echo $c[$index][1]."</a><br/>";

          }

          //return;
          $smarty->assign('menu_item',$map);

          $smarty->display($page);
          ?>

          posted on 2005-12-30 14:22 bluesky 閱讀(1666) 評論(0)  編輯  收藏 所屬分類: PHP

          主站蜘蛛池模板: 定州市| 成武县| 游戏| 双牌县| 岢岚县| 卓资县| 浦县| 绥德县| 新源县| 通化市| 鹿邑县| 高陵县| 和田市| 丹寨县| 石屏县| 罗定市| 昆明市| 上饶县| 麻江县| 阳西县| 安图县| 仲巴县| 济南市| 榆社县| 古蔺县| 文安县| 阳春市| 北川| 筠连县| 唐海县| 贵州省| 长汀县| 灵川县| 沾益县| 房产| 莫力| 肃南| 共和县| 长泰县| 仪征市| 阜新市|