<?php
class Car{
public $name="BWM";
}
$car=new Car();
echo $car->name;
?>
class Car{
public $name="BWM";
}
$car=new Car();
echo $car->name;
?>
2015-07-07
原文应该是路径错误了:$filename = '/data/webroot/usercode/code/resource/test.txt';
2015-07-07
<?php
class Car {
public $speed = 0;
//增加speedUp方法,使speed加10
public function speedUp($a){
$this->speed += $a;
}
}
$car = new Car();
$car->speedUp(10);
echo $car->speed;
?>
class Car {
public $speed = 0;
//增加speedUp方法,使speed加10
public function speedUp($a){
$this->speed += $a;
}
}
$car = new Car();
$car->speedUp(10);
echo $car->speed;
?>
2015-07-06