欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 php之smarty简单安装配置介绍: 1 首先,下载: 2 然后,安装: (1)解压文件后,复制libs文件到网站根目录,改名为smarty; (2)在根目录新建四个文件夹:templates,templates_c,configs,cache; 3
欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入
php之smarty简单安装配置介绍:
1 首先,下载:
2 然后,安装:
(1)解压文件后,复制libs文件到网站根目录,改名为smarty;
(2)在根目录新建四个文件夹:templates,templates_c,configs,cache;
3 最后,测试:
(1)建个php文件:text.php
include_once('smarty/Smarty.class.php');
include_once('smarty/Config_File.class.php');
include_once('smarty/Smarty_Compiler.class.php');
$smarty = new Smarty;
$smarty->template_dir = 'templates/'; //模板存放目录
$smarty->compile_dir = 'templates_c/'; //编译目录
$smarty -> left_delimiter = "{{"; //左定界符
$smarty -> right_delimiter = "}}"; //右定界符
$smarty -> assign('name','php自学网');
$smarty->assign('title','欢迎来到php自学网!);
$smarty -> display('index.tpl');
?>
(2)在templates下,建个tpl文件:index.tpl
{{$name}}
(3)运行test.php, 配置成功。

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

DVWA
Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能

Dreamweaver Mac版
視覺化網頁開發工具

禪工作室 13.0.1
強大的PHP整合開發環境