echo mysql_get_client_info()."<br/>";//获取mysql客户端信息
echo mysql_get_host_info()."<br/>";//获取mysql主机信息
echo mysql_get_server_info()."<br/>";//获取mysql服务器信息
echo mysql_get_proto_info()."<br/>";//获取mysql协议信息
mysql_set_charset("gz2313");//设置mysql编码
$utp =mysql_client_encoding($mysql->lianjie("127.0.0.1", "root", ""));//返回默认字符集名称
echo $utp;
$arra=array("主机信息"=>array(mysql_get_client_info()),"服务器信息"=>array(mysql_get_server_info()));
foreach ($arra as $k =>$value){
var_dump($value) ."<br/>";
}
$str = "sdsss";
echo strlen($str)."<br/>";//计算字符长度
$str =" sss asdqwe asd ";$str = trim($str);//去掉两边的空格
echo strlen($str);
$replace = "binglan";
$search ="cc";
$subject= "hehe";
echo str_replace($search, $replace, $subject);//关键字屏蔽
时间: 2024-10-12 15:55:50