-
-
异常代码
2016-11-10
- 问:可选参数,不传的时候,实际上他会传默认值,这样param函数取不到可选参数吗
-
0赞 · 0采集
-
-
木易涛童鞋
2016-06-25
- //开发一个构造函数,定义几个参数,在实例化的时候,
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;
-
0赞 · 0采集
-
-
林静听蝉
2015-09-24
- //开发一个构造函数,定义几个参数,在实例化的时候,
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;
-
截图
0赞 · 0采集
-
-
webwwb
2015-06-17
- 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;
}
}
-
0赞 · 0采集