<?php class Parser { private $_tpl; public function __construct($_tplFile) { if (! $this->_tpl = file_get_contents($_tplFile)) { exit('ERROR:模版文件讀取錯(cuò)誤'); } } private function parvar() { $_patten = '/<!--\s+\{$([\w]+)\}\s+-->/'; if (preg_match($_patten,$this->_tpl)) { $this->_tpl = preg_replace($_patten, "<?php echo $this->_vars[''];?>",$this->_tpl); } } private function parif(){ $_pattenif = '/<!--\s+\{if\s+$([\w]+)\}\s+-->/'; $_pattenElse = '/<!--\s+\{else\}\s+-->/'; $_pattenEndif = '/<!--\s+\{\/if\}\s+-->/'; if (preg_match($_pattenif,$this->_tpl)) { if (preg_match($_pattenEndif,$this->_tpl)) { $this->_tpl = preg_replace($_pattenif,"<?php if ($this->_vars['']){?>",$this->_tpl); $this->_tpl = preg_replace($_pattenEndif,"<?php } ?>",$this->_tpl); if (preg_match($_pattenElse,$this->_tpl)) { $this->_tpl = preg_replace($_pattenElse,"<?php }else{?>",$this->_tpl); } }else{ echo 'ERROR:IF語句沒有關(guān)閉!'; } } }
??? ??? ??? ?? ? ???? ????, ??? ?? ??? ??? ?? ????, ?? ??? ???? IF ?? ?? ??? ?? ??? ??? ?? ???? ???? ??? ?????.
? ???? ?? ???? ???? ????? ?? ???? ????? ????????. ?????? ???? ?? ??????! ? ???? ?? ???? ?? ?????? ?????. ??? ???? ???? ??? ????. ??? ??? ?? ??? ?? ??? ???? ????! ??? ?? ?? ??? ???? ????? ????. ???: admin@php.cn
?? ??

07 Jul 2025
??? ??? ???? ?? ??? ?? ??? ?? ??? ??? ??? ???? ?????. ?? ??? ??? ????. 1. int, char*? ?? ??? ?? ?? ??? ???? ?? ?? ?? ???; 2. ?? ?? ? ? ????? ?? ??? ?????. 3. ??? ?? ? ?? ??? ?? ??? ??. ?? ???? ?? ?? ?? ??? ????? ?? ???? ?? ?? ?? ?? ?? ?? ? ???? ??? ????? ?????. ?? ??? ??? ? : ?? ??? ??? ??? ???? ??? ? ??? ??? ?? ???? ??? ?? ?? ??? ?????.

02 Nov 2024
??? ??? ??????? ??? ????? ? ?? ??? ??? ? ??? ???? C? ??? ?????.

29 Jul 2016
discuz ???: discuz ??? Discuz ??? ?? ??? ??? ??: ?? ?? ?? ?? Discuz ?? ??? ?? ?? Discuz ???? ?? ???? ?? ???? ?? ? ??? ??? ??? ?????. ?????? ?? ??? ???? ?????. Discuz.???? ???? ??? ?? ?????.discus?? ??? ??? ????? template.class.php? 172?? ?? ?? ??? ???? ???? ???. template.func.php ? discuz ?? ??


??? ??

??? ?? ????? PHP ?????
??? ?? ????? PHP ?????

50?? ??? ??? PHP ???? ??
??? PHP ????, ??? ????? ??? ???? ?????

??? ???? ?? ?? PHP ?????
??? ???? ?? ?? PHP ?????
