time;echo $mes;
出错信息如下:
Parse error: syntax error, unexpected '(', expecting ',' or ';' in C:\php\apache\htdocs\test5.php on line 5 回复讨论(解决方案)
class Mytime{
public $time;
function __construct() {
$this->time = date('Y-m-d H:i:s');
}
}
定义类时,类属性的值不能是可变的量
class Mytime{
public $time;
function __construct() {
$this->time = date('Y-m-d H:i:s');
}
}
定义类时,类属性的值不能是可变的量
版主真乃神人也