本站为一个技术型PHP个人门户站,提供一些代码,技术文章、免费空间消息信息、让学习编程更轻松和不要钱买空间更方便-PHP小戴
你当前的位置:首页>>技术文章>>php技术文章

config_load 函数使用

  • 今天在看smarty摸版,哦哦开始做这个函数config_load这个函数的作用该函数用于从配置文件中加载变量

    OK代码在就下面这些

    conf.php


    <?php

    include_once("libs/Smarty.class.php"); //包含smarty类文件

    $smarty1 = new Smarty();

    $smarty1->template_dir = "htmlmoban";
    $smarty1->compile_dir = "templates_c";

    $smarty1->left_delimiter = "<{";
    $smarty1->right_delimiter = "}>";


    $smarty1->assign("name", "config_load 函数使用");
    $smarty1->display("gogal.html");

    ?>

    gogal.html

    <{config_load file="../inc.conf"}>

    <{$name}>
    <{#ipc#}>

    inc.conf

    ipc="小戴个人门户提供技术文章"

    运行下来结果就是

    config_load 函数使用小戴个人门户提供技术文章


  • [时间:2008-12-20 16:50:44][点击:]

  • 上下篇文章加载中...
本站关键字:宁波网络公司/宁波网站建设公司/宁波网站制作公司/宁波做网站公司