info.html
html
body
form action="test_post.php" method="POST"
学号: input name="number" type="number" maxlength="10"/br/
学号: input name="number" type="number" maxlength="10"/br/
学号: input name="number" type="number" maxlength="10"/br/
input type="submit" value="提 交"
/form
/body
/html
test_post.php
a href="test_get.php?username=XXnumber
=XXXXXXXX"测试$GET/a
php
$username=$_POST["username"];
$number=$_POST["number"];
test_get.php
$number=$_GET["number"];
$username=$_GET["username"];
echo $number;
echo $username;
php计划任务(按指定时间来运行某个程序)
第一个首先要解决的时谁来触发,我选择的是用前台页面来触发,
代码如下:
第二个要解决的时什么时侯运行,(具体的不讲了,把代码贴出)
代码://计划执行时间
if($job=='cron'){
check_method();
//查询数据库的下一个时间是否小于现在的时间
if($maxrecord['deltemptime']$nowtime['timestamp']){
$crondb = array();
//day为0为每日 week周 minute时间断 hour什么时侯开始
$rt['cron'] = array('day'='0','week'=$config['cron_week'],'m'=$config['cron_minute'],'hour'=$config['cron_hour']);
$crondb[] = $rt;
}
foreach ($crondb AS $key = $cron_val){
//设置了允许分钟段
if (!empty($config['cron_minute'])){
$m = explode(' ', $config['cron_minute']);
$m_now = intval(local_date('i',$nowtime['timestamp']));
if (!in_array($m_now, $m)) {//不包含此分钟的跳出
continue;
/*执行任务*/
/*********此处是你写的任务***********************/
$next_time = get_next_time($cron_val['cron']);
$DB-query("UPDATE ◆maxrec◆ SET ◆deltemptime◆={$next_time}");
exit;
第二个验证,提交from,有js的验证插件可以搜到,如果只要求不为空就是先获取用户名和密码的value,判断是否为空,空的就显示后面隐藏的'不能为空'.
第三个,如果用户名密码都有数据 就提交表单到php页面.
完成,打字很累 ,题主看着办啊
楼主?[switch?case]?了解一下
$op?=?get($op)
$num1=1;
switch?($op){
case?'◆':
break;
case?'-':
....
以上就是土嘎嘎小编为大家整理的每日作业php相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!