Code前端首页关于Code前端联系我们

php程序设计期末试题,php程序设计试卷A参考答案

terry 2年前 (2023-09-30) 阅读数 29 #PHP
文章标签 PHP dirname()

本文目录一览:

  • 1、php程序设计期末考试题目,应该php语言编写程序,mysql数据库服务器创建一个数据库,数据库
  • 2、php程序设计选择题
  • 3、PHP程序设计试卷
  • 4、php简单编程题!!急急急!
  • 5、php小程序设计题

php程序设计期末考试题目,应该php语言编写程序,mysql数据库服务器创建一个数据库,数据库

如果没具体要求的话,可以百度一个,网上有很多免费的,就是得自己测试是否能用,如果有具体要求就得动手做了,具体私聊哦

php程序设计选择题

a.

a.

a.

d. Select * from employees where 姓名 like ‘%文%’

d.

d.

b.

cd.

b.

PHP程序设计试卷

1、"php"

2、?和?php ; ?php和?

3、赋值 ; 判断

4、5

5、这个题太无聊 是在考转义

6、你简直太棒了!

7、数据库地址 ; 数据库用户名

php简单编程题!!急急急!

?php

header('Content-type: text/html; charset=utf-8');

/**

 * 验证用户名,只能有数字字母下划线,不能数字开头,长度6-20

 * @param string $name 用户名

 * @return bool

 */

function username_verify($name) {

    return (bool)preg_match('/^(_|[a-z])\w{5,19}$/i', $name);

}

/**

 * 验证密码:数字,下划线,字母,6-16位

 * @param string $pw 密码

 * @return bool

 */

function password_verify($pw) {

    return (bool)preg_match('/^\w{6,16}$/i', $pw);

}

/**

 * 判断学生成绩等级

 * @param  int $score 成绩

 * @return mixed

 */

function score_level($score) {

    if ($score0 || $score100) {

        return false;

    }

    if ($score = 90) {

        return 'a级';

    } elseif ($score = 80) {

        return 'b级';

    } elseif ($score = 70) {

        return 'c级';

    }

}

php小程序设计题

$con = mysql_connect("localhost","root",'123456');

$mysql_select_db("lesson",$con);

mysql_query("set names utf8");

$sql = "select count(*) from student where math80 and english80";

$num = mysql_query($sql);

echo "数学和英语成绩均大于等于80分的学生总数:" . $num;

$sql1 = "select * from student where math80 and english80";

$arr = mysql_query($sql1);

$str = "table border='1'trth姓名/thth总分/th/tr";

while($row = mysql_fetch_assoc($arr))

{

$str .= "tr";

$str .= "td" . $row['name']. "/td";

$str .= "td" . $row['math']+$row['english']. "/td";

$str .= "/tr";

}

echo $str;

mysql_close($con);

版权声明

本文仅代表作者观点,不代表Code前端网立场。
本文系作者Code前端网发表,如需转载,请注明页面地址。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门