ãã¥ã¼ããªã¢ã« - ããã³ãã³ã³ããã¼ã©
Moonyãåä½ãããããã«ã¯ãããã³ãã³ã³ããã¼ã©ãå¿ è¦ã§ããããã³ãã³ã³ããã¼ã©ã«ã¯3ã¤ã®å½¹å²ãããã¾ãã
- PATH_INFOãåãåããã¨
- Moonyãèµ·åããããã®è¨å®ãè¡ããã¨
- Moonyã®ã¤ã³ã¹ã¿ã³ã¹ãçæããèµ·åããããã¨
ä¾ãã°ãããã³ãã³ã³ããã¼ã©ãindex.phpã¨ããå称ã§ä½æããã¨ãã¾ãã/index.php/hoge.htmlã¨ããURLã«ã¢ã¯ã»ã¹ããã£ãå ´åãPATH_INFOã«ã¯/hoge.htmlã¨ããæååãæ ¼ç´ããã¾ãããã®PATH_INFOãå ã«ãMoonyã¯ã¢ã¯ã·ã§ã³åã決å®ã該å½ããã¢ã¯ã·ã§ã³ãå®è¡ãããã¨ã«ãªãã¾ãã
Moonyã®èµ·åè¨å®ã¯é£æ³é åãç¨ãã¦è¡ãã¾ããè¨å®ãããã¹ãå 容ã¯ä¸è¡¨ã®éãã§ãã
ãã¼ | è¨å®å 容 | è¨å®å | å¿ é ï¼ä»»æ |
---|---|---|---|
action_dir | ã¢ã¯ã·ã§ã³ã¯ã©ã¹ã®æ ¼ç´å | string | å¿ é |
template_dir | ãã³ãã¬ã¼ããã¡ã¤ã«ã®æ ¼ç´å | string | å¿ é |
compile_dir | ã³ã³ãã¤ã«ããããã³ãã¬ã¼ããã¡ã¤ã«ã®æ ¼ç´å | string | å¿ é |
log_dir | ããã¹ããã°ã®æ ¼ç´å | string | å¿ é |
smarty_class | Smarty.class.phpã®ãã¹ | string | å¿ é |
cache_dir | ãã³ãã¬ã¼ããã¡ã¤ã«ã®ãã£ãã·ã¥ã®æ ¼ç´å | string | ä»»æ |
config_dir | ãã³ãã¬ã¼ããã¡ã¤ã«ã®è¨å®ãã¡ã¤ã«ã®æ ¼ç´å | string | ä»»æ |
compile_check | ãã³ãã¬ã¼ããã¡ã¤ã«ã®æ´æ°ããã§ãã¯ãããã©ãã | boolean | ä»»æ |
force_compile | 常ã«ãã³ãã¬ã¼ããã¡ã¤ã«ãã³ã³ãã¤ã«ãããã©ãã | boolean | ä»»æ |
以ä¸ãè¸ã¾ãã¦ãindex.phpã®å®è£ ä¾ã以ä¸ã«ç¤ºãã¾ãã
<?php require_once '/path/to/Moony.php'; $settings = array( 'action_dir' => 'app/action', 'template_dir' => 'app/template', 'compile_dir' => 'work', 'log_dir' => 'log', 'smarty_class' => '/path/to/Smarty.class.php' ); $moony =& new Moony($settings); $moony->activate(); ?>
ããã³ãã³ã³ããã¼ã©ã®å®è£ ã¯ããã§çµããã§ãã