一些php函数
2020-11-25 01:39
标签:style blog class code java color 一些php函数,搜素材,soscw.com 一些php函数 标签:style blog class code java color 原文地址:http://www.cnblogs.com/ysbl/p/3705131.htmlecho mysql_get_client_info()."
";//获取mysql客户端信息
echo mysql_get_host_info()."
";//获取mysql主机信息
echo mysql_get_server_info()."
";//获取mysql服务器信息
echo mysql_get_proto_info()."
";//获取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) ."
";
}
$str = "sdsss";
echo strlen($str)."
";//计算字符长度
$str =" sss asdqwe asd ";
$str = trim($str);//去掉两边的空格
echo strlen($str);
$replace = "binglan";
$search ="cc";
$subject= "hehe";
echo str_replace($search, $replace, $subject);//关键字屏蔽
上一篇:傻瓜式理解递归之php递归
下一篇:Unity Web前端研究