-
public function display($templateName = null, $ext = '.html'){ $templateName = empty($templateName)?$this->curr }查看全部
-
$compiledFilename = $this->compileDir.md5($templateName).$ext;查看全部
-
$subject = '{#$test#}'; $subject = preg_replace($pattern,'<php echo $\\1;?,>'$subject); echo $subject;查看全部
-
$pattern = '/'.preg_quote($this->leftTag); $pattern .=' *\$([a-zA-Z_]\w*)*'; $pattern .= preg_quote($this->reghtTag).'/'; $this->outputHtml = preg_replace($pattern,'<?PP echo $this->getVar(\'$1\')?>?)',$thi->out查看全部
-
<html> <head> <mate charset="utf-8"> <title>{#$pagetitle#}</title> </head> <body> \{#(\w+)#}\ </body> </html>查看全部
-
public function compileTemplate($templateName = null,$ext = '.html'){ $templateName = empty($templateName)?$this->currentTemp:$templateName }查看全部
-
public function gettSourceTemplate($templateName,$ext = '.html'){ $this->currentTemp = $templateName; $sourceFilename = $this->templateDir.$this->currentTemp. }查看全部
-
public function assign($tag,$var){ $this->varpool[$tag]=$var; } public function getVar($tag){ return $this->varpool[$tag]; }查看全部
-
class template{ private $templateDir; private $compileDir; private $leftTag = '{#'; private $currentTemp = ‘’; private $outputHtml; private $varpool = array(); public function_construct($templateDir,$compileDir,$leftTag = null, $rightTag = null){ $this->templateDir = $templateDir; $this->compileDir = $compileDir; if(!empty($leftTag))$this->leftTag = $leftTag; if(!empty($rightTag))$this->rightTag = $rightTag; } }查看全部
-
class template{ private $templateDir; private $compileDir; private $leftTag = '{#'; private $currentTemp = ‘’; private $outputHtml; private $varpool = array(); }查看全部
-
bad模式单元(晋级) 总模式 每一个pattern可以看作一个总模式 子模式 pattern中的每一个单元(...)子模式 $pattern = '/^(\w+)\.(\w+)\.com$/';查看全部
-
<html> <head> <title>用户注册</title> </head> <body> <form action="regCheck.php" method="post"> 用户名<input type="text" name="username" id="username" value=""/><br/> email<input type="text" name="email" id="email" value=""/><br/> 手机号<input type="text" name="mobile" id="mobile" value=''/><br/> </form> </body> </html>查看全部
-
require_once 'regexTool.class.php'; $regex = new regexTool(); $regex->setFixMode('u'); $r = $regex->isEmail(name@163.com); show($r);查看全部
-
常见修正模式 U/u 懒惰匹配/贪婪匹配 i 忽略大小写 x 忽略空白 s 让元字符‘.’匹配包括换行符在内的所有字符查看全部
-
修正模式: 贪婪匹配(匹配结果存在歧义时取其长,默认匹配模式,符号是“U”,添加在匹配模式的最后面,示例/0-9/U)和懒惰匹配(匹配结果存在歧义时取其短)查看全部
举报
0/150
提交
取消