PHP试题带答案

上传人:re****.1 文档编号:565047225 上传时间:2023-02-27 格式:DOC 页数:6 大小:49.50KB
返回 下载 相关 举报
PHP试题带答案_第1页
第1页 / 共6页
PHP试题带答案_第2页
第2页 / 共6页
PHP试题带答案_第3页
第3页 / 共6页
PHP试题带答案_第4页
第4页 / 共6页
PHP试题带答案_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《PHP试题带答案》由会员分享,可在线阅读,更多相关《PHP试题带答案(6页珍藏版)》请在金锄头文库上搜索。

1、 一、是非题:(每题1分,共10分)(说明:认为陈述正确的在括号内打“”;否则在括号内打“”)评卷人得分1PHP中变量名“$_abc”不是合法的。( )2PHP只能使用Mysql数据库。( )3PHP中的数组键必须为数字,且从“0”开始。( )4全等运算符“=”在比较时,只有在两者的数据类型和值都相同时才返回True。( )5“mysql_connect( )”与“mysql_connect( )”没有任何区别。( )6使用continue语句可以实现PHP程序的跳转。( )7HTML中的Form表单数据必须使用Submit按钮才可以提交。( )8PHP中的die()和exit()都可以实现程

2、序中止退出功能。( )9PHP程序中可以随时嵌入HTML代码和JS代码。( )10PHP中的Session功能可以完全不受制于客户端的Cookie设置。( )二、填空题:(每空1分,共10分)评卷人得分1HTML的Form表单中定义单选按钮需要使用INPUT的 类型,定义复选按钮需要使用INPUT的 类型。2PHP表达式10%2.5值为 ,表达式10/2.5值为 。3Mysql数据库服务默认开放的端口号是 ,默认管理员为 。4为了能够避免SQL注入,你需要坚持 。5表达式“Testing.3+5.12”的值为 。6PHP函数中可以利用 向外返回一个值,可以使用 声明一个全局变量。三、单选题:(

3、每题2分,共30分)(说明:将认为正确答案的字母填写在每小题后而的括号内)评卷人得分1输出结果为:( )A123 B423 C122 D4132The PHP function that is used to create functions, headers, footers, or elements that will be reused on multiple pages is( ).Arequire() Brefill() Creuse() DNone of the Above3If you want to come out of a while loop which of the f

4、ollowing is used? ( )Aexit Bclose Cend Dbreak4Which of the following statement about PHP is FALSE?( )APHP is a web scripting language.BPHP is a client side language.CPHP is server-side scripting language that allows you to generate dynamic websites.DAll the Above5Which of the following are valid flo

5、at values?A4.5678 B4.0 C7e4 DAll of above6Study following steps and determine the correct order(1) Open a connection to MySQL server(2) Execute the SQL query(3) Fetch the data from query(4) Select database(5) Close ConnectionA1, 4, 2, 3, 5 B4, 1, 2, 3, 5 C1, 5, 4, 2, 1 D4, 1, 3, 2, 57What is the cor

6、rect way to add 1 to the $count variable? ( )A$count =+1 B+count Ccount+; D$count+;8What is the correct way to create a function in PHP?( )Afunction myFunction() Bnew_function myFunction()Ccreate myFunction() Dvoid myFunction()9下列哪个HTML标记是用来标记图像的?( )A B C D10运行输出的结果为:( )Ab$b B$a$b Cba! Dab11 输出结果为:(

7、 )Ax10 B0x10 C0 D1612PHP中,下列哪个操作符用来连接字符串?( )A+ B. C& D*13?php for($i=1;$i输出结果为:( )A1,2,3 B1,2, C1,2 D12,14red,2,name=apple,4); echo $a2; ?输出结果为:( )Ared B4 Capple D215下列哪个不是PHP的输出命令:( )Aecho Bprintf() Cprint Dwrite四、程序分析:(每题2分,共30分)(说明:写出各PHP程序运行后在浏览器里看到的结果)评卷人得分1?php $score=90; if($score 你的成绩及格了! 你的成绩不及格! 2 3 4 5=1) test(); test(); ? 6 723); ? 85) break; echo +$i; ? 9?php $id=3; while($id 10 11 12 13南阳理工,0=cba,123);$num=count($sz); echo $num; ? 14?php$a = 20;$b=$a/10

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 习题/试题

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号