class Car {
public static $speed = 0;
//增加speedUp方法,使speed加10
public static function speedUp(){
self::$speed+=10;
}
}
//$car = new Car();
Car::speedUp();
echo Car::$speed;
public static $speed = 0;
//增加speedUp方法,使speed加10
public static function speedUp(){
self::$speed+=10;
}
}
//$car = new Car();
Car::speedUp();
echo Car::$speed;
2015-08-04
<?php
$filename = '/data/webroot/usercode/code/resource/test.txt';
//编写代码读取$filename的文件内容
$content = file_get_contents($filename);
echo $content;
路径少了个/code
$filename = '/data/webroot/usercode/code/resource/test.txt';
//编写代码读取$filename的文件内容
$content = file_get_contents($filename);
echo $content;
路径少了个/code
2015-08-03