$this->allowExts数组中已经有一个数据。但执行下列代码,出现的结果却令人惊讶。 为什么呢?
$t=$this->allowExts;
if( empty( $t ) ) {
print('****empty!');
}
else {
print('****Not empty!');
}
if( empty( $this->allowExts ) ) {
print('****empty!----');
}
else {
print('****Not empty!----');
}
$t=$this->allowExts;
if( empty( $t ) ) {
print('****empty!');
}
else {
print('****Not empty!');
}
if( empty( $this->allowExts ) ) {
print('****empty!----');
}
else {
print('****Not empty!----');
}
****Not empty!
****empty!----
不明白这是什么原因。
var_dump($t)看一下结果是什么