一、是非题:(每题1分,共10分)
(说明:认为陈述正确的在括号内打“√”;否则在括号内打“×”)
评卷人
得分
1.PHP中变量名“$_abc”不是合法的。( )
2.PHP只能使用Mysql数据库。( )
3.PHP中的数组键必须为数字,且从“0”开始。( )
4.全等运算符“===”在比较时,只有在两者的数据类型和值都相同时才返回True。( )
5.“mysql_connect( )”与“@mysql_connect( )”没有任何区别。( )
6.使用continue语句可以实现PHP程序的跳转。( )
7.HTML中的Form表单数据必须使用Submit按钮才可以提交。( )
8.PHP中的die()和exit()都可以实现程序中止退出功能。( )
9.PHP程序中可以随时嵌入HTML代码和JS代码。( )
10.PHP中的Session功能可以完全不受制于客户端的Cookie设置。( )
二、填空题:(每空1分,共10分)
评卷人
得分
1.HTML的Form表单中定义单选按钮需要使用INPUT的 类型,定义复选按钮需要使用INPUT的 类型。
2.PHP表达式10%2.5值为 ,表达式10/2.5值为 。
3.Mysql数据库服务默认开放的端口号是 ,默认管理员为 。
4.为了能够避免SQL注入,你需要坚持 。
5.表达式“'Testing'.'3'+'5'.'12'”的值为 。
6.PHP函数中可以利用 向外返回一个值,可以使用 声明一个全局变量。
三、单选题:(每题2分,共30分)
(说明:将认为正确答案的字母填写在每小题后而的括号内)
评卷人
得分
1.<?php $a=1; $b=2; $c=3; ($a=4)?($b--):($c--); echo $a,$b,$c; ?>输出结果为:( )
A.123 B.423 C.122 D.413
2.The PHP function that is used to create functions, headers, footers, or elements that will be reused on multiple pages is( ).
A.require() B.refill() C.reuse() D.None of the Above
3.If you want to come out of a while loop which of the following is used? ( )
A.exit B.close C.end D.break
4.Which of the following statement about PHP is FALSE?( )
A.PHP is a web scripting language.
B.PHP is a client side language.
C.PHP is server-side scripting language that allows you to generate dynamic websites.
D.All the Above
5.Which of the following are valid float values?
A.4.5678 B.4.0 C.7e4 D.All of above
6.Study 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 Connection
A.1, 4, 2, 3, 5 B.4, 1, 2, 3, 5 C.1, 5, 4, 2, 1 D.4,