class Truck extends Car{
public function speedUp(){
return $this->speed+=60;
}
}
你们试一下,我试过了,可以的!
public function speedUp(){
return $this->speed+=60;
}
}
你们试一下,我试过了,可以的!
2017-01-20
echo file_exists($filename)?'文件存在':'文件不存在';
2017-01-20
<?php
$subject = "my email is spark@imooc.com";
//在这里补充代码,实现正则匹配,并输出邮箱地址
$email = '/is ([\w\@\.]+)/';
preg_match($email, $subject, $matches);
print_r($matches[1]);
?>
$subject = "my email is spark@imooc.com";
//在这里补充代码,实现正则匹配,并输出邮箱地址
$email = '/is ([\w\@\.]+)/';
preg_match($email, $subject, $matches);
print_r($matches[1]);
?>
2017-01-18
functio
n getsize($size, $format = 'kb') {
$p = 0;
if ($format == 'kb') {
$p = 0;echo $size."kb<br>=";
} elseif ($format == 'mb') {
$p = 1;echo $size."mb<br>=";
} elseif ($format == 'gb') {
$p = 2;echo $size."gb<br>=";
}
$size = $size*pow(1024,$p);
n getsize($size, $format = 'kb') {
$p = 0;
if ($format == 'kb') {
$p = 0;echo $size."kb<br>=";
} elseif ($format == 'mb') {
$p = 1;echo $size."mb<br>=";
} elseif ($format == 'gb') {
$p = 2;echo $size."gb<br>=";
}
$size = $size*pow(1024,$p);
2017-01-17
调用下面的代码,知道了服务器上面的index.php的内容。
if(file_exists('index.php')){
$content = file_get_contents('index.php');
echo $content;
}
内容为:
= "5.3") {
$root = __DIR__;
} else {
$root = dirname(__FILE__);
}
define("APP_PATH", $root);
date_default_timezone_set('Asia/Chongqing');
if(file_exists('index.php')){
$content = file_get_contents('index.php');
echo $content;
}
内容为:
= "5.3") {
$root = __DIR__;
} else {
$root = dirname(__FILE__);
}
define("APP_PATH", $root);
date_default_timezone_set('Asia/Chongqing');
2017-01-17
$offset=($page-1)*$pagesieze;
SELECT * FROM table limit $offset,$pagesize;
SELECT * FROM table limit $offset,$pagesize;
2017-01-17