国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ??? ?? PHP ???? PHP MVC ???? ??? ?? ?? ?? ??

PHP MVC ???? ??? ?? ?? ?? ??

Jul 25, 2016 am 09:05 AM

  1. /*
  2. * ???: 模板解析類
  3. * ???: 51JS.COM-ZMM
  4. * ??: 2011.3.1
  5. * ???: 304924248@qq.com
  6. * ???: http://www.cnblogs.com/cnzmm/
  7. * ??: http://bbs.it-home.org
  8. */
  9. ??? ??? {
  10. public $html, $vars, $bTag, $eTag;
  11. ?? $bFlag='{', $eFlag='}', $pfix='zmm:';
  12. ??? $??, $file;
  13. function __construct($vars=array()) {
  14. !empty($vars) && $this->vars = $vars;
  15. !empty($GLOBALS['cfg_tag_prefix']) &&
  16. $this->pfix = $GLOBALS['cfg_tag_prefix'].':';
  17. $this->bTag = $this->bFlag.$this->pfix;
  18. $this->eTag = $this->bFlag.'/'.$this->pfix;
  19. empty(Tags::$vars) && Tags::$vars = &$this->vars;
  20. }
  21. ?? ?? LoadTpl($tpl) {
  22. $this->file = $this->GetTplPath($tpl);
  23. ??::$file = &$this->file;
  24. if (is_file($this->file)) {
  25. if ($this->GetTplHtml()) {
  26. $this->SetTplTags();
  27. } else {
  28. exit('模板文件加載失敗!');
  29. }
  30. } else {
  31. exit('模板文件['.$this->file.']?存?!');
  32. }
  33. }
  34. ??? ?? GetTplPath($tpl) {
  35. $this->folder = WEBSITE_DIRROOT.
  36. $GLOBALS['cfg_tpl_root'];
  37. $this->??? ?????.'/'.$tpl;
  38. }
  39. ??? ?? GetTplHtml() {
  40. $html = self::FmtTplHtml(file_get_contents($this->file));
  41. if (!empty($html)) {
  42. $callFunc = Tags::$prefix.'??';
  43. $this->html = Tags::$callFunc($html, new Template());
  44. } else {
  45. exit('模板文件內(nèi)容為空!');
  46. } true? ?????.
  47. }
  48. ?? ?? ?? FmtTplHtml($html) {
  49. return preg_replace('/(r)|(n)|(t)|(s{2,})/is', '', $html);
  50. }
  51. ?? ?? Register($vars=array()) {
  52. if (is_array($vars)) {
  53. $this->vars = $vars;
  54. ??::$vars = &$this->vars;
  55. }
  56. }
  57. ?? ?? Display($bool=false, $name="", $time=0) {
  58. if (!empty($this->html)) {
  59. if ($bool && !empty($name)) {
  60. if (!is_int($time)) $time = 600;
  61. $cache = ? ??($time);
  62. $cache->Set($name, $this->html);
  63. }
  64. echo $this->html; ???();
  65. } else {
  66. exit('模板文件內(nèi)容為空!');
  67. }
  68. }
  69. ?? ?? SetAssign($souc, $info) {
  70. if (!empty($this->html)) {
  71. $this->html = str_ireplace ($souc, self::FmtTplHtml($info), $this->html);
  72. } else {
  73. exit('模板文件內(nèi)容為空!');
  74. }
  75. }
  76. ??? ?? SetTplTags() {
  77. $this->SetPanelTags(); $this->SetTrunkTags(); $this->RegHatchVars();
  78. }
  79. ??? ?? SetPanelTags() {
  80. $rule = $this->bTag.'([^'.$this->eFlag.'] )/'.$this-> e???;
  81. preg_match_all('/'.$rule.'/ism', $this->html, $out_matches);
  82. $this->TransTag($out_matches, '??'); unset($out_matches);
  83. }
  84. ??? ?? SetTrunkTags() {
  85. $rule = $this->bTag.'(w )s*([^'.$this->eFlag.']*?)' .$this->eFlag.
  86. '((?:(?!'.$this->bTag.')[Ss]*?|(?R))*)'.$this->eTag.'\1s*'. $this->eFlag;
  87. preg_match_all('/'.$rule.'/ism', $this->html, $out_matches);
  88. $this->TransTag($out_matches, '???'); unset($out_matches);
  89. }
  90. ??? ?? TransTag($result, $type) {
  91. if (!empty($result[0])) {
  92. switch ($type) {
  93. case 'panel' : {
  94. for ($i = 0; $i $strTag = ??(' ', $result[1][$i], 2);
  95. if (strpos($strTag[0], '.')) {
  96. $itemArg =Explode('.', $result[1][$i], 2);
  97. $callFunc = ??::$prefix.ucfirst($itemArg[0]);
  98. if (method_exists('Tags', $callFunc)) {
  99. $html = Tags::$callFunc(chop($itemArg[1]));
  100. if ($html !== false) {
  101. $this->html = str_ireplace($result[0][$i], $html, $this->html);
  102. }
  103. }
  104. } else {
  105. $rule = '^([^s] )s*([Ss] )$';
  106. preg_match_all('/'.$rule.'/is', Trim($result[1][$i]), $tmp_matches);
  107. $callFunc = ??::$prefix.ucfirst($tmp_matches[1][0]);
  108. if (method_exists('Tags', $callFunc)) {
  109. $html = Tags::$callFunc($tmp_matches[2][0]);
  110. if ($html !== false) {
  111. $this->html = str_ireplace($result[0][$i], $html, $this->html);
  112. }
  113. } unset($tmp_matches);
  114. }
  115. } ??;
  116. }
  117. case '???': {
  118. for ($i = 0; $i < count($result[0]); $i ) {
  119. $callFunc = ??::$ prefix.ucfirst($result[1][$i]);
  120. if (method_exists('Tags', $callFunc)) {
  121. $html = Tags::$callFunc($result[2][$i], $result[3][$i]);
  122. $this->html = str_ireplace($result[0][$i], $html, $this->html);
  123. }
  124. } ??;
  125. }
  126. ???: ??;
  127. }
  128. } else {
  129. false? ?????.
  130. }
  131. }
  132. ??? ?? RegHatchVars() {
  133. $this->SetPanelTags();
  134. }
  135. function __destruct() {}
  136. }
  137. ?>
復(fù)代碼

2. ?? ?? ??? : (??? ? ?? ??? ?? ?? ????? ????? ??)

  1. /*
  2. * ???: 標(biāo)簽解析類
  3. * ???: 51JS.COM-ZMM
  4. * ??: 2011.3.2
  5. * ???: 304924248@qq.com
  6. * ???: http://www.cnblogs.com/cnzmm/
  7. * ??: http://bbs.it-home.org
  8. */
  9. class ?? {
  10. static private $attrs=null;
  11. ?? ?? $file, $vars, $rule, $prefix='TAG_';
  12. ?? ?? ?? TAG_Syntax($html, $that) {
  13. $rule = $that->bTag.'ifs ([^'.$that->eFlag.'] )s*'.$ that->eFlag;
  14. $html = preg_replace('/'.$rule.'/ism', '', $html);
  15. $rule = $that->bTag.'elseifs ([^'.$that->eFlag.'] )s*'.$that->eFlag;
  16. $html = preg_replace('/'.$rule.'/ism', '', $html);
  17. $rule = $that->bTag.'elses*'.$that->eFlag;
  18. $html = preg_replace('/'.$rule.'/ism', '', $html);
  19. $rule = $that->bTag.'loops (S )s (S )s*'.$that->eFlag;
  20. $html = preg_replace('/'.$rule.'/ism', '', $html);
  21. $rule = $that->bTag.'loops (S )s (S )s (S )s*'.$that->eFlag;
  22. $html = preg_replace('/'.$rule.'/ism', ' \3) { ?>', $html);
  23. $rule = $that->eTag.'(if|loop)s*'.$that->eFlag;
  24. $html = preg_replace('/'.$rule.'/ism', '', $html);
  25. $rule = $that->bTag.'phps*'.$that->eFlag.'((?:(?!'.
  26. $that->bTag.')[Ss] *?|(?R))*)'.$that->eTag.'phps*'.$that->eFlag;
  27. $html = preg_replace('/'.$rule.'/ism', '', $html);
  28. return self::TAG_Execute($html);
  29. }
  30. ?? ?? ?? TAG_List($attr, $html) {
  31. if (!empty($html)) {
  32. if (self::TAG_HaveTag($html)) {
  33. return self::TAG_DealTag($attr, $html, true);
  34. } else {
  35. return self::TAG_GetData($attr, $html, true);
  36. }
  37. } else {
  38. exit('標(biāo)簽{list}的內(nèi)容為空!');
  39. }
  40. }
  41. ?? ?? ?? TAG_Data($attr, $html) {
  42. if (!empty($html)) {
  43. if (self::TAG_HaveTag($html)) {
  44. return self::TAG_DealTag($attr, $html, false);
  45. } else {
  46. return self::TAG_GetData($attr, $html, false);
  47. }
  48. } else {
  49. exit('標(biāo)簽{data}的內(nèi)容為空!');
  50. }
  51. }
  52. ?? ?? ?? TAG_Execute($html) {
  53. ob_clean(); ob_start();
  54. if (!empty(self::$vars)) {
  55. is_array(self::$vars) &&
  56. extract(self::$vars, EXTR_OVERWRITE);
  57. }
  58. $file_inc = WEBSITE_DIRINC.'/buffer/'.
  59. md5(uniqid(rand(), true)).'.php';
  60. if ($fp = fopen($file_inc, 'xb')) {
  61. fwrite($fp, $html);
  62. if (fclose($fp)) {
  63. include($file_inc);
  64. $html = ob_get_contents();
  65. } ?? ??($fp);
  66. } else {
  67. exit('模板解析文件生成失敗!');
  68. } ob_end_clean(); @unlink($file_inc);
  69. $html? ?????.
  70. }
  71. ?? ??? ?? TAG_HaveTag($html) {
  72. $bool_has = false;
  73. $tpl_ins = ? ???();
  74. self::$rule = $tpl_ins->bTag.'([^'.$tpl_ins->eFlag.'] )/'.$tpl_ins->eFlag;
  75. $bool_has = $bool_has || preg_match('/'.self::$rule.'/ism', $html);
  76. self::$rule = $tpl_ins->bTag.'(w )s*([^'.$tpl_ins->eFlag.']*?)'.$tpl_ins->eFlag.
  77. '((?:(?!'.$tpl_ins->bTag.')[Ss]*?|(?R))*)'.$tpl_ins->eTag.'\1s*'. $tpl_ins->eFlag;
  78. $bool_has = $bool_has || preg_match('/'.self::$rule.'/ism', $html);
  79. ?? ??($tpl_ins);
  80. $bool_has? ?????.
  81. }
  82. ?? ??? ?? TAG_DealTag($attr, $html, $list) {
  83. preg_match_all('/'.self::$rule.'/ism', $html, $out_matches);
  84. if (!empty($out_matches[0])) {
  85. $child_node = array();
  86. for ($i = 0; $i $child_node[] = $out_matches[3][$i];
  87. $html = str_ireplace($out_matches[3][$i], '{-->>child_node_'.$i.'<<--}', $html);
  88. }
  89. $html = self::TAG_GetData($attr, $html, $list);
  90. for ($i = 0; $i < count($out_matches[0]); $i ) {
  91. $html = str_ireplace('{-->>child_node_'.$i.' <<--}', $child_node[$i], $html);
  92. }
  93. preg_match_all('/'.self::$rule.'/ism', $html, $tmp_matches);
  94. if (!empty($tmp_matches[0])) {
  95. for ($i = 0; $i < count($tmp_matches[0]); $i ) {
  96. $callFunc = self ::$prefix.ucfirst($tmp_matches[1][$i]);
  97. if (method_exists('Tags', $callFunc)) {
  98. $temp = self::$callFunc($tmp_matches[2][$i], $tmp_matches[3][$i]);
  99. $html = str_ireplace($tmp_matches[0][$i], $temp, $html);
  100. }
  101. }
  102. }
  103. unset($tmp_matches);
  104. }
  105. unset($out_matches); $html? ?????.
  106. }
  107. ?? ??? ?? TAG_GetData($attr, $html, $list=false) {
  108. if (!empty($attr)) {
  109. $attr_ins = new Attbt($attr);
  110. $attr_arr = $attr_ins->attrs;
  111. if (is_array($attr_arr)) {
  112. extract($attr_arr, EXTR_OVERWRITE);
  113. $source = ???_??($source, $column);
  114. $rule = '[??:s*(w )s*([^]]*?)s*/?]';
  115. preg_match_all('/'.$rule.'/is', $html, $out_matches);
  116. $data_str = '';
  117. $data_ins = ??? DataSql();
  118. $attr_where = $attr_order = '';
  119. if (!empty($where)) {
  120. $where = str_replace(',', ' and ', $where);
  121. $attr_where = '??'. $???;
  122. }
  123. if (!empty($order)) {
  124. $attr_order = '?? ??'.$order;
  125. } else {
  126. $fed_name = '';
  127. $fed_ins = $data_ins->GetFedNeedle($source);
  128. $fed_cnt = $data_ins->GetFedCount($fed_ins);
  129. for ($i = 0; $i $fed_flag = $data_ins->GetFedFlag($fed_ins, $i);
  130. if (preg_match('/auto_increment/ism', $fed_flag)) {
  131. $fed_name = $data_ins->GetFedName($fed_ins, $i);
  132. ??;
  133. }
  134. }
  135. if (!empty($fed_name))
  136. $attr_order = ''.$fed_name?? ?????.' ??';
  137. }
  138. if ($list == true) {
  139. if (empty($source) &&empty($sql)) {
  140. exit('標(biāo)簽{list}必須指?source屬性!' );
  141. }
  142. $attr_rows = $attr_page = '';
  143. if ($rows > 0) {
  144. $attr_rows = ' ?? 0,'.$rows;
  145. }
  146. if (!empty($sql)) {
  147. $data_sql = $sql;
  148. } else {
  149. $data_sql = '`'.$source.'`?? *? ?????.
  150. $attr_where.$attr_order.$attr_rows;
  151. }
  152. if ($pages=='true' && !empty($size)) {
  153. $data_num = $data_ins->GetRecNum($data_sql);
  154. $page_cnt = ceil($data_num / $size);
  155. ??? $page;
  156. if (!isset($page) || $page < 1) $page = 1;
  157. if ($page > $page_cnt) $page = $page_cnt;
  158. $data_sql = '``.$source.'`'.$attr_where?? *? ?????.
  159. $attr_order.' ?? '.($page-1) * $size.','.$size;
  160. $GLOBALS['cfg_page_curr'] = $???;
  161. $GLOBALS['cfg_page_prev'] = $??? - 1;
  162. $GLOBALS['cfg_page_next'] = $??? 1;
  163. $GLOBALS['cfg_page_nums'] = $page_cnt;
  164. if (function_exists('list_pagelink')) {
  165. $GLOBALS['cfg_page_list'] = list_pagelink($page, $page_cnt, 2);
  166. }
  167. }
  168. $data_idx = 0;
  169. $data_ret = $data_ins->SqlCmdExec($data_sql);
  170. while ($row = $data_ins->GetRecArr($data_ret)) {
  171. if ($skip > 0 && !empty($flag)) {
  172. $data_idx != 0 &&
  173. $data_idx % $skip == 0 &&
  174. $data_str .= $flag;
  175. }
  176. $data_tmp = $html;
  177. $data_tmp = str_ireplace('@idx', $data_idx, $data_tmp);
  178. for ($i = 0; $i $data_tmp = str_ireplace($out_matches[0][$i],
  179. $row [$out_matches[1][$i]], $data_tmp);
  180. }
  181. $data_str .= $data_tmp; $data_idx ;
  182. }
  183. } else {
  184. if (empty($source)) {
  185. exit('標(biāo)簽{data}必須指?source屬性!');
  186. }
  187. $data_sql = '``.$source?? *? ?????.
  188. '`'.$attr_where.$attr_order;
  189. $row = $data_ins->GetOneRec($data_sql);
  190. if (is_array($row)) {
  191. $data_tmp = $html;
  192. for ($i = 0; $i $data_val = $row[$out_matches[1][$i]];
  193. if (empty($out_matches[2][$i])) {
  194. $data_tmp = str_ireplace($out_matches[0][$i], $data_val, $data_tmp);
  195. } else {
  196. $attr_str = $out_matches[2][$i];
  197. $attr_ins = ? ??($attr_str);
  198. $func_txt = $attr_ins->attrs['function'];
  199. if (!empty($func_txt)) {
  200. $func_tmp = ??('(', $func_txt);
  201. if (function_exists($func_tmp[0])) {
  202. eval(' $func_ret ='.str_ireplace('@me',
  203. '''.$data_val.''', $func_txt))
  204. $data_tmp = str_ireplace($out_matches[0][$i], $ func_ret, $data_tmp);
  205. } else {
  206. exit('調(diào)用了不存??函數(shù)!')
  207. }
  208. } else {
  209. exit('標(biāo)簽設(shè)置屬無(wú)效!' );
  210. }
  211. }
  212. $data_str .= $data_tmp
  213. }
  214. }
  215. unset($data_ins)
  216. return $data_str; >} else {
  217. exit('標(biāo)簽設(shè)置屬性無(wú)效!');
  218. }
  219. } else {
  220. exit('沒(méi)有設(shè)置標(biāo)簽屬性!')
  221. }
  222. }
  223. ?? ?? ?? __callStatic($name, $args) {
  224. exit('標(biāo)簽{'.$name.'}不存?!')
  225. }
  226. }
  227. ?>
???碼
? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1601
29
PHP ????
1502
276
???
PHP ?? ??? ??????? PHP ?? ??? ??????? Jul 17, 2025 am 04:16 AM

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP?? ?? ???? ???? ???? ??? ?????? PHP?? ?? ???? ???? ???? ??? ?????? Jul 08, 2025 am 02:37 AM

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP?? ?? ?? PHP?? ?? ?? Jul 18, 2025 am 04:57 AM

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

PHP ?? ?? ? PHP ?? ?? ? Jul 18, 2025 am 04:51 AM

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

PHP?? ???? ??? ?????? PHP?? ???? ??? ?????? Jul 11, 2025 am 03:12 AM

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

?? PHP : ??? ??? ?? PHP : ??? ??? Jul 18, 2025 am 04:54 AM

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled

?? PHP ?? ??? ?? PHP ?? ??? Jul 18, 2025 am 04:52 AM

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2

PHP?? ??? ? ???? ??? ????? ?? PHP?? ??? ? ???? ??? ????? ?? Jul 12, 2025 am 03:15 AM

PHP??? ???? ??? ?? ?? ????? ???? ??? ?? ??? ??? ?? ? ??? ??? ???? ?????. ???? 0?? ???? ?? ??? ???? ? ?? ???? ?? ?? ? ? ????. MB_SUBSTR? ?? ??? ??? ???????. ? : $ str = "hello"; echo $ str [0]; ?? H; ??? MB_SUBSTR ($ str, 1,1)? ?? ??? ??? ??? ??????. ?? ???????? ???? ??? ???? ?? ???? ?? ?? ???? ?????? ??? ????? ?? ??? ?? ??? ???? ???? ?? ????.

See all articles