推 linrobz:把他echo出來不就知道了? 10/03 11:29
http://blog.roodo.com/jaceju/archives/175925.html
main.php
<?php
include "library/Smarty/Smarty.class.php";
define('APP_PATH', str_replace('\\', '/', dirname(__FILE__)));
$tpl = new Smarty();
$tpl->template_dir = APP_PATH . "/templates/";
$tpl->compile_dir = APP_PATH . "/templates_c/";
$tpl->config_dir = APP_PATH . "/configs/";
$tpl->cache_dir = APP_PATH . "/cache/";
?>
第二行
define('APP_PATH', str_replace('\\', '/', dirname(__FILE__)));
它的意思是什麼呀?我知道它是在設定路徑
可是它為什麼這樣寫=>'APP_PATH', str_replace('\\', '/', dirname(__FILE__))
--
~*‧~‧*~*‧~‧*~*‧~*
╭╮ ○ ╭─╮╭─╮╭─╮╭╮ ○ ╭─╮ With this ring,
││ ╭╮│ ┤││││ ┤│╰╮╭╮│ ┤ I give to you my promise,
│└╮││├ ││ │├ ││ ││││ ┤ from this date forward you should
╰─╯╰╯╰─╯╰─╯╰┴╯╰┴╯╰╯╰─╯ not walk alone.
ψcrystalclear ~*‧~‧*~*‧~‧*~*‧~*
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.127.184.34
我在網路上看Smarty的範例