PHP实用小程序(六)
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<title>检测操作系统和浏览器类型</title>
</HEAD>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="20" bgColor="#FFFFFF">
<?
/*
浏览器类型、版本
*/ if(ereg( 'MSIE ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
{
$browser_Ver=$log_version[1];
$browserType='IE';
}
elseif(ereg( 'Opera ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
{
$browser_Ver=$log_version[1];
$browserType='OPERA';
}
elseif(ereg( 'Mozilla/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
{
$browser_Ver=$log_version[1];
$browserType='MOZILLA';
}
else
{
$browser_Ver=0;
$browserType='OTHER';
}
echo "<br><br>浏览器类型:<font color=red>$browserType $browser_Ver</font>";
/*
操作系统类型
*/
if(strpos($HTTP_USER_AGENT,'Windows 9'))
{
$osType="Windows 9X";
}
elseif(strpos($HTTP_USER_AGENT,'Windows NT'))
{
$osType="Windows NT";
}
elseif(strpos($HTTP_USER_AGENT,'Windows 2000'))
{
$osType="Windows 2000";
}
elseif(strpos($HTTP_USER_AGENT,'Mac'))
{
$osType="Mac";
}
elseif(strpos($HTTP_USER_AGENT,'Unix'))
{
$osType="Unix";
}
elseif(strpos($HTTP_USER_AGENT,'Linux'))
{
$osType="Linux";
}else $osType="Others"; echo "<br><br>操作系统类型:<font color=red>$osType</font>";
echo "<br><br>IP地址:<font color=red>$REMOTE_ADDR</font>";
?>
</bady>
</html>
<?
/*本例是用PHP4连接一个mysql数据库操作的演示,
实现连接打开一个库,并读取数据的基本功能。
*/
?>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<style type="text/css">
<!--
input { font-size:9pt;}
A:link {text-decoration: underline; font-size:9pt;color:000059}
A:visited {text-decoration: underline; font-size:9pt;color:000059}
A:active {text-decoration: none; font-size:9pt}
A:hover {text-decoration:underline;color:red}
body,table {font-size: 9pt}
tr,td{font-size:9pt}
-->
</style>
<title>注册会员列表 - 读取mysql的测试</title>
</HEAD>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
<br><br><center><font color=green size=3><b>注 册 会 员 列 表</b></font></center>
<br>
<table cellspacing=0 bordercolordark=#FFFFFF width="95%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="5%" align="center" valign="bottom" height="19">ID</td>
<td width="10%" align="center" valign="bottom">姓名</td>
<td width="5%" align="center" valign="bottom">性别</td>
<td width="5%" align="center" valign="bottom">年龄</td>
<td width="20%" align="center" valign="bottom">联系电话</td>
<td width="20%" align="center" valign="bottom">电子邮件</td>
<td width="20%" align="center" valign="bottom">家庭住址</td>
</tr>
<?
//连接到本地mysql数据库
$myconn=mysql_connect("localhost","root","");
//选择test为操作库
mysql_select_db("test",$myconn);
$strSql="select * from reguser";
//用mysql_query函数从user表里读取数据
$result=mysql_query($strSql,$myconn);
while($row=mysql_fetch_array($result))//通过循环读取数据内容
{
?>
<tr>
<td align="center" height="19"><?echo $row["id"]?></td>
<td align="center"><?echo $row["userid"]?></td>
<td align="center"><?echo $row["sex"]?></td>
<td align="center"><?echo $row["age"]?></td>
<td align="center"><?echo $row["tel"]?></td>
<td align="center"><?echo $row["email"]?></td>
<td align="center"><?echo $row["address"]?></td>
</tr>
<?
}
//关闭对数据库的连接
mysql_close($myconn);
?>
</table>
</BODY>
</HTML>
<?
//本例是用PHP4实现向一个mysql数据表添加记录,
?>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<style type="text/css">
<!--
input { font-size:9pt;}
A:link {text-decoration: underline; font-size:9pt;color:000059}
A:visited {text-decoration: underline; font-size:9pt;color:000059}
A:active {text-decoration: none; font-size:9pt}
A:hover {text-decoration:underline;color:red}
body,table {font-size: 9pt}
tr,td{font-size:9pt}
-->
</style>
<title>会员注册 - 添加记录演示</title>
</HEAD>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
<?
if(strlen($userid)<1)
{
?>
<br><br><center><font color=green size=3><b>注 册 会 员 表 单</b></font></center>
<br>
<form action="<? echo $PHP_SELF; ?>" method="get" name="frmAdduser">
<table cellspacing=0 bordercolordark=#FFFFFF width="60%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="100%" align="center" valign="bottom" height="19" colspan="2">请仔细填写以下内容</td>
</tr>
<tr>
<td width="30%" align="right" height="19">姓名:</td>
<td width="70%"><input type="text" name="userid" size="10" maxlength="18"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">性别:</td>
<td width="70%"><input type="radio" name="sex" value="男" checked>男
<input type="radio" name="sex" value="女">女</td>
</tr>
<tr>
<td width="30%" align="right" height="19">年龄:</td>
<td width="70%"><input type="text" name="age" size="5" maxlength="2"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">联系电话:</td>
<td width="70%"><input type="text" name="tel" size="20"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">电子邮件:</td>
<td width="70%"><input type="text" name="email" size="20"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">家庭住址:</td>
<td width="70%"><input type="text" name="address" size="30"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2"><input type="submit" value="马上注册"> <input type="reset" value="全部重写"></td>
</tr>
</table>
</form>
<?
}
else
{
//连接到本地mysql数据库
$myconn=mysql_connect("localhost","root","");
mysql_select_db("test",$myconn);
//将用户填写信息添加到数据库
$strSql="insert into reguser(userid,sex,age,tel,email,address)
values('$userid','$sex',$age,'$tel','$email','$address')";
$result=mysql_query($strSql,$myconn) or die(mysql_error());
//关闭对数据库的连接
mysql_close($myconn);
echo "<br><br><br><center>您已经成功注册成我们的会员!<br><br><br><br><a href=\"7-1.php\">查看会员资料</a></center>";
}
?>
</BODY>
</HTML>
<?
//本例是用PHP4实现修改一个mysql数据表,
?>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<style type="text/css">
<!--
input { font-size:9pt;}
A:link {text-decoration: underline; font-size:9pt;color:000059}
A:visited {text-decoration: underline; font-size:9pt;color:000059}
A:active {text-decoration: none; font-size:9pt}
A:hover {text-decoration:underline;color:red}
body,table {font-size: 9pt}
tr,td{font-size:9pt}
-->
</style>
<title>会员注册 - 修改记录测试</title>
</HEAD>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
<br><br><center><font color=green size=3><b>注 册 会 员 信 息 编 辑 表 单</b></font></center>
<br>
<?
//连接到本地mysql数据库
$myconn=mysql_connect("localhost","root","");
//选择test为操作库
mysql_select_db("test",$myconn);
if(strlen($id)<1)
{
?> <table cellspacing=0 bordercolordark=#FFFFFF width="95%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="5%" align="center" valign="bottom" height="19">ID</td>
<td width="10%" align="center" valign="bottom">姓名</td>
<td width="5%" align="center" valign="bottom">性别</td>
<td width="5%" align="center" valign="bottom">年龄</td>
<td width="20%" align="center" valign="bottom">联系电话</td>
<td width="20%" align="center" valign="bottom">电子邮件</td>
<td width="20%" align="center" valign="bottom">家庭住址</td>
</tr>
<?
$strSql="select * from reguser";
//用mysql_query函数从reguser表里读取数据
$result=mysql_query($strSql,$myconn);
while($row=mysql_fetch_array($result))//通过循环读取数据内容
{
?>
<tr>
<td align="center" height="19"><?echo $row["id"]?></td>
<td align="center"><a href="83.php?id=<?echo $row["id"]?>"><?echo $row["userid"]?></a></td>
<td align="center"><?echo $row["sex"]?></td>
<td align="center"><?echo $row["age"]?></td>
<td align="center"><?echo $row["tel"]?></td>
<td align="center"><?echo $row["email"]?></td>
<td align="center"><?echo $row["address"]?></td>
</tr>
<?
}
?>
</table>
<?
}
else if(strlen($userid)<1)
{
//将用户的信息填写到输入框
$strSql="select * from reguser where id=$id";
$result=mysql_query($strSql,$myconn) or die(mysql_error());
$row=mysql_fetch_array($result);
?>
<form action="<? echo $PHP_SELF; ?>" method="get" name="frmAdduser">
<table cellspacing=0 bordercolordark=#FFFFFF width="60%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="100%" align="center" valign="bottom" height="19" colspan="2">用户信息修改</td>
</tr>
<tr>
<td width="30%" align="right" height="19">姓名:</td>
<td width="70%"><input type="text" name="userid" size="10" maxlength="18" value="<?echo $row["userid"]?>"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">性别:</td>
<td width="70%">
<?//隐藏用户ID?>
<input type="hidden" name="id" value="<?echo $row["id"]?>">
<input type="radio" name="sex" value="男"<?if($row["sex"]=="男") print(" checked");?>>男
<input type="radio" name="sex" value="女"<?if($row["sex"]=="女") print(" checked");?>>女</td>
</tr>
<tr>
<td width="30%" align="right" height="19">年龄:</td>
<td width="70%"><input type="text" name="age" size="5" maxlength="2" value="<?echo $row["age"]?>"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">联系电话:</td>
<td width="70%"><input type="text" name="tel" size="20" value="<?echo $row["tel"]?>"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">电子邮件:</td>
<td width="70%"><input type="text" name="email" size="20" value="<?echo $row["email"]?>"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">家庭住址:</td>
<td width="70%"><input type="text" name="address" size="30" value="<?echo $row["address"]?>"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2"><input type="submit" value="修 改"> <input type="reset" value="取 消"></td>
</tr>
</table>
</form>
<?
}
//如果用户填写了资料则对数据进行更新
if(strlen($userid)>1)
{
$strSql="update reguser set userid='$userid',sex='$sex',age=$age,tel='$tel',email='$email',address='$address' where id=$id";
//更新该ID所对应的资料
$result=mysql_query($strSql,$myconn) or die(mysql_error());
echo "<br><br><br><center>您已经成功修改了用户信息!<br><br><br><br><a href=\"82.php\">查看会员资料</a></center>";
}
//关闭对数据库的连接
mysql_close($myconn);
?>
</BODY>
</HTML>
<?
//本例是用PHP4实现删除一个mysql数据记录,
?>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<style type="text/css">
<!--
input { font-size:9pt;}
A:link {text-decoration: underline; font-size:9pt;color:000059}
A:visited {text-decoration: underline; font-size:9pt;color:000059}
A:active {text-decoration: none; font-size:9pt}
A:hover {text-decoration:underline;color:red}
body,table {font-size: 9pt}
tr,td{font-size:9pt}
-->
</style>
<title>会员注册 - 删除记录演示</title>
</HEAD>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
<br><br><center><font color=green size=3><b>注 册 会 员 信 息 删 除 表 单</b></font></center>
<br>
<?
//连接到本地mysql数据库
$myconn=mysql_connect("localhost","root","");
//选择test为操作库
mysql_select_db("test",$myconn);
if(strlen($id)<1)
{
?> <table cellspacing=0 bordercolordark=#FFFFFF width="95%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="5%" align="center" valign="bottom" height="19">ID</td>
<td width="10%" align="center" valign="bottom">姓名</td>
<td width="5%" align="center" valign="bottom">性别</td>
<td width="5%" align="center" valign="bottom">年龄</td>
<td width="20%" align="center" valign="bottom">联系电话</td>
<td width="20%" align="center" valign="bottom">电子邮件</td>
<td width="20%" align="center" valign="bottom">家庭住址</td>
</tr>
<?
$strSql="select * from reguser";
//用mysql_query函数从reguser表里读取数据
$result=mysql_query($strSql,$myconn);
while($row=mysql_fetch_array($result))//通过循环读取数据内容
{
?>
<tr>
<td align="center" height="19"><?echo $row["id"]?></td>
<td align="center"><a href="<?echo $PHP_SELF?>?id=<?echo $row["id"]?>"><?echo $row["userid"]?></a></td>
<td align="center"><?echo $row["sex"]?></td>
<td align="center"><?echo $row["age"]?></td>
<td align="center"><?echo $row["tel"]?></td>
<td align="center"><?echo $row["email"]?></td>
<td align="center"><?echo $row["address"]?></td>
</tr>
<?
}
?>
</table>
<?
}
else
{
//进行删除操作$id为删除的记录号
$strSql="delete from reguser where id=$id";
$result=mysql_query($strSql,$myconn) or die(mysql_error());
echo "<br><br><br><center>您已经成功删除了该ID的信息!<br><br><br><br><a href=\"$PHP_SELF\">查看会员资料</a></center>";
}
//关闭对数据库的连接
mysql_close($myconn);
?>
</BODY>
</HTML>
<?
/*本例是用PHP4通过ODBC访问数据库操作的演示*/
?>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<style type="text/css">
<!--
input { font-size:9pt;}
A:link {text-decoration: underline; font-size:9pt;color:000059}
A:visited {text-decoration: underline; font-size:9pt;color:000059}
A:active {text-decoration: none; font-size:9pt}
A:hover {text-decoration:underline;color:red}
body,table {font-size: 9pt}
tr,td{font-size:9pt}
-->
</style>
<title>注册会员列表 - 通过ODBC访问数据库演示</title>
</HEAD>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
<br><br><center><font color=green size=3><b>注 册 会 员 列 表</b></font></center>
<br>
<table cellspacing=0 bordercolordark=#FFFFFF width="95%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="5%" align="center" valign="bottom" height="19">ID</td>
<td width="10%" align="center" valign="bottom">姓名</td>
<td width="5%" align="center" valign="bottom">性别</td>
<td width="5%" align="center" valign="bottom">年龄</td>
<td width="20%" align="center" valign="bottom">联系电话</td>
<td width="20%" align="center" valign="bottom">电子邮件</td>
<td width="20%" align="center" valign="bottom">家庭住址</td>
</tr>
<?
//连接到ODBC数据库
$myconn=odbc_connect("fengfeng","sa","123");
$strSql="select * from reguser";
/*执行查询*/
$result=odbc_do($myconn,$strSql);
//Boolean odbc_fetch_row(integer result,integer row)
while(odbc_fetch_row($result))//通过循环读取数据内容
{
?>
<tr>
<td align="center" height="19"><?echo odbc_result($result,1)?></td>
<td align="center"><?echo odbc_result($result,2)?></td>
<td align="center"><?echo odbc_result($result,3)?></td>
<td align="center"><?echo odbc_result($result,4)?></td>
<td align="center"><?echo odbc_result($result,5)?></td>
<td align="center"><?echo odbc_result($result,6)?></td>
<td align="center"><?echo odbc_result($result,7)?></td>
</tr>
<?
}
//关闭对数据库的连接
odbc_close("$myconn");
?>
</table>
</BODY>
</HTML>
<?
//本例是用PHP4实现向一个ODBC数据表添加记录,
?>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<style type="text/css">
<!--
input { font-size:9pt;}
A:link {text-decoration: underline; font-size:9pt;color:000059}
A:visited {text-decoration: underline; font-size:9pt;color:000059}
A:active {text-decoration: none; font-size:9pt}
A:hover {text-decoration:underline;color:red}
body,table {font-size: 9pt}
tr,td{font-size:9pt}
-->
</style>
<title>会员注册 - 添加记录演示</title>
</HEAD>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
<?
if(strlen($userid)<1)
{
?>
<br><br><center><font color=green size=3><b>注 册 会 员 表 单</b></font></center>
<br>
<form action="<? echo $PHP_SELF; ?>" method="get" name="frmAdduser">
<table cellspacing=0 bordercolordark=#FFFFFF width="60%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="100%" align="center" valign="bottom" height="19" colspan="2">请仔细填写以下内容</td>
</tr>
<tr>
<td width="30%" align="right" height="19">姓名:</td>
<td width="70%"><input type="text" name="userid" size="10" maxlength="18"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">性别:</td>
<td width="70%"><input type="radio" name="sex" value="男" checked>男
<input type="radio" name="sex" value="女">女</td>
</tr>
<tr>
<td width="30%" align="right" height="19">年龄:</td>
<td width="70%"><input type="text" name="age" size="5" maxlength="2"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">联系电话:</td>
<td width="70%"><input type="text" name="tel" size="20"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">电子邮件:</td>
<td width="70%"><input type="text" name="email" size="20"></td>
</tr>
<tr>
<td width="30%" align="right" height="19">家庭住址:</td>
<td width="70%"><input type="text" name="address" size="30"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2"><input type="submit" value="马上注册"> <input type="reset" value="全部重写"></td>
</tr>
</table>
</form>
<?
}
else
{
//连接到ODBC数据库
$myconn=odbc_connect("fengfeng","sa","123");
//将用户填写信息添加到数据库
$strSql="insert into reguser(userid,sex,age,tel,email,address)
values('$userid','$sex',$age,'$tel','$email','$address')";
$result=odbc_do($myconn,$strSql);
//关闭对数据库的连接
odbc_close("$myconn");
echo "<br><br><br><center>您已经成功注册成我们的会员!<br><br><br><br><a href=\"7-5.php\">查看会员资料</a></center>";
}
?>
</BODY>
</HTML>
<html>
<head>
<title>用户登录</title>
</head>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
<br>
<?
if($userid!="")
{
mysql_connect("localhost", "root", "");
mysql_select_db("test") or die ("不能连接到数据库!");
//判断用户名和密码是否在正确
$strSql="select * from users where userid='$userid' and password='$password'";
$result=mysql_query($strSql);// or die("读取数据库出现错误!");
$num=mysql_numrows($result);
mysql_close($myconn);
if($num>0)
{
echo "<center>登录成功!</center><br>";
}
else echo "<center><font color=red>登录失败!请检查用户名和密码!</font></center><br>";
}
else
{
echo "<center>请输入用户名和密码登录!</center>"
?>
<form action="<?echo $PHP_SELF?>" method="post">
<table cellspacing=0 bordercolordark=#FFFFFF width="60%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="100%" align="center" valign="bottom" height="19" colspan="3">用户登录</td>
</tr>
<tr>
<td width="30%" align="center">用户名:</td>
<td width="70%" align="center"><input type="text" name="userid" size="20" maxsize="20"></td>
</tr>
<tr>
<td width="30%" align="center">密 码:</td>
<td width="70%" align="center"><input type="password" name="password" size="20" maxsize="20"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2"><input type="submit" value="登录"></td>
</tr>
</table>
</form>
<?
}
?>
</body>
</html>
<html>
<head>
<title>注册新用户</title>
</head>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFFF">
<br>
<?
if($userid!="")
{
$ID = uniqid("userID");
$db = mysql_connect("localhost","root","");
mysql_select_db ("test");
$result = mysql_query ("insert into users (id, username, userid, password, email)
VALUES ('$ID', '$username', '$userid', '$password','$email')");
if(!$result)
{
echo "<center>出现错误:</center>", mysql_error();
exit;
}
if($result)
{
mysql_close($db);
echo "<center>用户 <b>$username</b> 注册成功!</center>";
}
}
else
{
echo "<center>资料填写不完整,请仔细填写!</center>";
?>
<form method="post" action="<?echo $PHP_SELF?>">
<table cellspacing=0 bordercolordark=#FFFFFF width="60%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="100%" align="center" valign="bottom" height="19">注册新用户</td>
</tr>
<tr>
<td width="100%" align="center">
姓名:<INPUT TYPE=text MAXLENGTH=20 NAME="username" SIZE=20><Br>
呢称:<INPUT TYPE=text MAXLENGTH=20 NAME="userid" SIZE=20><Br>
密码:<Input Type=text Maxlength=20 Name="password" Size=20><Br>
邮件:<Input Type=text Maxlength=50 Name="email" Size=20><Br>
<INPUT TYPE=submit VALUE="注 册">
<INPUT type=reset VALUE="重 填">
</td>
</tr>
</table>
</form>
<?
}
?>
</body>
</html>
PHP实用小程序(六)的更多相关文章
- 微信小程序(六)-项目实例(原生框架 MINA基配搭建)==01-头搜索框tabbar
项目实例(原生框架 MINA) 1.新建小程序项目 1.用自已的小程序APPID 2.清除整理项目中初建默认无关的代码 1.app.json 中删除logs,同时删除pages下的losgs文件夹 2 ...
- PHP实用小程序(七)
<? //用COOKIE保存投票人的投票记录 if($vote && !$already_voted) SetCookie("already_voted",& ...
- PHP实用小程序(五)
<HTML> <HEAD> <TITLE>图像函数</TITLE> </HEAD> <BODY> <img src=&qu ...
- PHP实用小程序(四)
<HTML> <HEAD> <TITLE>访问文件时间属性</TITLE> </HEAD> <BODY> <? $Last ...
- PHP实用小程序(三)
<HTML> <HEAD> <TITLE>给数组增加元素</TITLE> </HEAD> <? $Cities[] = "& ...
- PHP实用小程序(二)
<HTML> <HEAD> <TITLE>经典循环例子</TITLE> </HEAD> <BODY> <? ; $coun ...
- PHP实用小程序(一)
<? //设置路径(默认当前php文件所在路径) $basedir = "d:/inetpub/wwwroot"; $textrows = "20"; $ ...
- 微信小程序开发 (资料汇总,谁还没被坑过?希望助你绕过一些坑)
最近帮人家做一个微信小程序,刚好想熟悉一下.由于牵扯到多用户使用系统,以及数据共享,所以自然架构选择了,客户端和服务器的方式. 后台服务器是windows server,后台程序是.Net WebA ...
- 【微信小程序开发•系列文章六】生命周期和路由
这篇文章理论的知识比较多一些,都是个人观点,描述有失妥当的地方希望读者指出. [微信小程序开发•系列文章一]入门 [微信小程序开发•系列文章二]视图层 [微信小程序开发•系列文章三]数据层 [微信小程 ...
随机推荐
- linux查看进程、端口
1 查看进程pidps -ef|grep tomcat 2 查看进程占用的端口netstat -ntlp|grep pid 3 查看端口对应的进程号lsof -i:portid
- canvas转盘抽奖的实现(二)
本篇是<canvas转盘抽奖的实现(一)>的另一种实现方法,主要通过css3的transform以及transition过渡来实现. // ' + r + '等奖'; } draw ...
- PS 魔法棒
魔术棒工具是通过选取图像中颜色相近或大面积单色区域的像素来制作选区,魔术棒用于纯色背景中较多. 容差数值越大,选择出的选区就越大,容差越小,对颜色差别的要求也就越严格,选择出的选区也就越小 按住shi ...
- inline-block的使用
inline-block是什么 inline和block是css中元素display属性的两个选项,而inline-block可以说是介于两者之间的属性值. inline使元素成为内联元素(inlin ...
- javascript和c#的深度拷贝的一种通用方法
很简单,序列化后反序列化...
- spring 监听器简介
在java web项目中我们通常会有这样的需求:当项目启动时执行一些初始化操作,例如从数据库加载全局配置文件等,通常情况下我们会用javaee规范中的Listener去实现 常用的监听器有spring ...
- EM算法索引
把这n个{试验结果来自B的概率}求和得到期望,平均后,得到B出正面的似然估计,同理有p和q. 重复迭代,直到收敛为止 http://blog.csdn.net/junnan321/article/de ...
- [Java多线程] volatile 关键字正确使用方法
volatile 变量具有 synchronized 的可见性特性,但是不具备原子特性,即多线程环境中,使用 volatile 关键字的变量仅可以保证不同线程读取变量时,可以读到最新修改的变量值,但是 ...
- vue2.x源码理解
也不知道哪股风潮,钻研源码竟成了深入理解的标配.我只想说一句,说的很对 准备工作 从GitHub上面下载vue的源码(https://github.com/vuejs/vue) 了解下Flow,Flo ...
- SpringMVC+Spring+MyBatis配置
今天配置项目时遇到一个问题,tomcat启动没有报错,但是访问页面的时总是报404,后台打印的日志是: 8080-exec-1] WARN springframework.web.servlet.Pa ...