$content = file_get_contents($filename);
echo $content.'.';
echo $content.'.';
2015-02-04
$sql = "insert into user(name, age, class) values($name,$age,$class)";
mysql_query($sql); //执行插入语句
$uid = mysql_insert_id();
echo $uid;
mysql_query($sql); //执行插入语句
$uid = mysql_insert_id();
echo $uid;
2015-02-04
echo file_get_contents($filename,null,null,0,100).'.';
2015-02-04
$p = '/[\w.-]+@[\w.-]+.\w{2,4}/';
应该这样比较完善一点。不知道有没有.com.cn net.cn这类结尾的邮箱,不然还要复杂点
应该这样比较完善一点。不知道有没有.com.cn net.cn这类结尾的邮箱,不然还要复杂点
2015-02-03
class Truck extends Car{
public function speedUp(){
$this->speed += 60;
}
}
public function speedUp(){
$this->speed += 60;
}
}
2015-02-03
$p = '/<li>(.*?)<\/li>/i';
preg_match_all($p,$str,$matches);
print_r($matches[1]);
//这样可通过
preg_match_all($p,$str,$matches);
print_r($matches[1]);
//这样可通过
2015-02-03