The author has 3 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
957 2
Smarty安裝測試
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 11/4/15 10:23
Smarty Installation test...
Testing template directory...
D:\Codes\PHP\test\learnsmarty\templates is OK.
Testing compile directory...
D:\Codes\PHP\test\learnsmarty\templates\templates_c is OK.
Testing plugins directory...
D:\Codes\PHP\test\learnsmarty\includes\library\Smarty\plugins is OK.
Testing cache directory...
D:\Codes\PHP\test\learnsmarty\templates\cache is OK.
Testing configs directory...
D:\Codes\PHP\test\learnsmarty\templates\config is OK.
Testing sysplugin files...
... OK
Testing plugin files...
... OK
Tests complete.
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 11/4/15 10:24
PHP代碼:
        $installPath = DOCUMENT_ROOT . 'includes/library/Smarty';
        $this->setTemplateDir(DOCUMENT_ROOT . 'templates');
        $this->setCompileDir(DOCUMENT_ROOT . 'templates/templates_c');
        $this->setPluginsDir("$installPath/plugins");
        $this->setCacheDir(DOCUMENT_ROOT . 'templates/cache');
        $this->setConfigDir(DOCUMENT_ROOT . 'templates/config');
        $this->testInstall();
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 3 Posted at: 11/4/15 10:24
DOCUMENT_ROOT的定義如下:
define('DOCUMENT_ROOT', str_replace('\\', '/', dirname(__DIR__)) . '/');
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 957 Replies: 2
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 11/4/15 10:24
Announcements