<?php
//连接数据库
$db = mysqli_connect('127.0.0.1', 'code1', '','code1');
mysqli_set_charset($db,'utf8');
//在这里进行数据查询
$res = mysqli_query($db,'select * from user limit 233');
$row = mysqli_fetch_array($res);
var_dump($row);
//连接数据库
$db = mysqli_connect('127.0.0.1', 'code1', '','code1');
mysqli_set_charset($db,'utf8');
//在这里进行数据查询
$res = mysqli_query($db,'select * from user limit 233');
$row = mysqli_fetch_array($res);
var_dump($row);
2018-01-25
class Car{
function __construct(){
print "父类的构造方法\n";
}
}
class Truck extends Car{
function __contruct(){
print "子类构造方法\n";
// parent::__contruct();
}
}
$car = new Truck();
function __construct(){
print "父类的构造方法\n";
}
}
class Truck extends Car{
function __contruct(){
print "子类构造方法\n";
// parent::__contruct();
}
}
$car = new Truck();
2018-01-25
$pattern="/is\s+(\w+@\w+\.([[:alpha:]])+)/";
preg_match($pattern,$subject,$mat2);
var_dump($mat2[1]);
preg_match($pattern,$subject,$mat2);
var_dump($mat2[1]);
2018-01-24