<?php class Parser { private $_tpl; public function __construct($_tplFile) { if (! $this->_tpl = file_get_contents($_tplFile)) { exit('ERROR:模版文件讀取錯誤'); } } 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? ??? ?????.

31 Oct 2024
??? ????? ?? ??? ???? ??? ????? ?? ??? ??? ???? ??????.template class Link {...

27 Nov 2024
??? ????? ??? ??? ??? ??? C?? ??? ??? ? ??? ??? ??? ????...

26 Nov 2024
C 20? ??? ??? ???? ?? ??? ???? ?? ?? ???? ?? ??? ??? ???? ???...

05 Dec 2024
C? ??? ????? ??? ??? ??? ??? C?? ??? ??? ? ??? ??? ? ??? ??? ? ????.


??? ??

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

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

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