所以说,路径为毛又多个/code/。。o(╯□╰)o
真正路径:/data/webroot/usercode/resource/test.txt
真正路径:/data/webroot/usercode/resource/test.txt
2014-12-08
<?php
$filename = '/data/webroot/usercode/resource/test.txt';
if (is_writeable($filename)) {
echo 'writeable<br>';
file_put_contents($filename, 'test');
}
if (is_readable($filename)) {
echo 'readable<br>';
}
$filename = '/data/webroot/usercode/resource/test.txt';
if (is_writeable($filename)) {
echo 'writeable<br>';
file_put_contents($filename, 'test');
}
if (is_readable($filename)) {
echo 'readable<br>';
}
2014-12-08
class Truck extends Car{
public function getSpeed(){
return $this->speed+=50;
}
}
$car = new Truck();
$car->speedUp();
//echo $car->speed."\n";
$car->getSpeed();
echo $car->speed."\n";
public function getSpeed(){
return $this->speed+=50;
}
}
$car = new Truck();
$car->speedUp();
//echo $car->speed."\n";
$car->getSpeed();
echo $car->speed."\n";
2014-12-08
class Truck extends Car{
public function getSpeed(){
$this->speed +=50;
return $this->speed;
}
}
$car = new Truck();
$car->speedUp();
echo $car->getSpeed();
public function getSpeed(){
$this->speed +=50;
return $this->speed;
}
}
$car = new Truck();
$car->speedUp();
echo $car->getSpeed();
2014-12-08
class Truck extends Car{
public function getSpeed(){
return $this->speed;
}
public function speedUp(){
$this->speed +=50;
}
}
差在哪里?
public function getSpeed(){
return $this->speed;
}
public function speedUp(){
$this->speed +=50;
}
}
差在哪里?
2014-12-08