[請益] 樣板路徑設定

看板PHP作者 (小麻)時間18年前 (2007/10/03 10:29), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/2 (看更多)
我在網路上看Smarty的範例 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

10/03 11:29, , 1F
把他echo出來不就知道了?
10/03 11:29, 1F
文章代碼(AID): #170lwM3n (PHP)
討論串 (同標題文章)
文章代碼(AID): #170lwM3n (PHP)