奥鹏作业答案 - 分忧网!奥鹏作业答案,奥鹏在线作业答案,奥鹏作业答案及毕业论文分忧

奥鹏作业答案,奥鹏在线作业答案,奥鹏在线考核_分忧网

当前位置: 主页 > 奥鹏作业 >

北语22春《PHP》作业1

时间:2022-05-05 09:19来源:未知 作者:admin 点击:
(单选题)1: 详细阅读下面的FORM 表单和PHP代码。当在表单里面的两个文本框分别输入php和great的时候,PHP代码将在页面中打印出什么?( ) form action=index.php method=post input type=text name=element[] input type=text name=element[] input type=sub
(单选题)1: 详细阅读下面的FORM 表单和PHP代码。当在表单里面的两个文本框分别输入’php’和’great’的时候,PHP代码将在页面中打印出什么?( ) <form action=’index.php’ method=’post’> <input type=’text’ name=’element[]’> <input type=’text’ name=’element[]’> <input type=’submit’ value=’提交’> </form> Index.php 代码如下: <?php if(
A: 什么都没有
B: Aarry
C: 一个提示
D: phpgreat


(单选题)2: 以下代码运行结果是什么?() <?php echo  ‘Testing ‘. 1+2. ‘45’; ?>
A: Testing 1245
B: Testing345
C: Testing 1 245
D: 245


(单选题)3: 以下php程序远程的结果是什么? <?php $array = array(‘3’=>’a’,1.1=>’b’,’c’,’d’); echo $array[1]; ?>
A: 1
B: b
C: c
D: 一个警告


(单选题)4: index.php脚本如何访问表单元素email的值?( ) <form action=’index.php’ method=’post’> <input type=’text’ name=’email’> <input type=’submit’ value=’提交’> </form>
A: $_GET[‘email’]
B: $_POST[‘email’]
C: $_SESSION[‘text’]
D: $_POST[‘text’]


(单选题)5: 下面的PHP程序运行结果是什么?( ) <?php $array = array (true => 'a',1 => 'b'); Print_r($array); ?>
A: 输出NULL
B: Array(0=> a [1]=>b)
C: Array([true] => a [1]=> b)
D: Array([1] => b)


(单选题)6: 考虑如下数据表和查询,如何添加索引功能提高查询速度?( ) Create table mytable( Id int, Name char(100), Address1 varchar(100), Address2 varchar(100), Zipcode varshar(10), Sity varchar(50), Province varchar(2) ) Select id, varchar From mytable Whe
A: 给Zipcode添加全文的索引
B: 给Name添加索引
C: 给Id添加索引,然后给Name和Zipcode分别添加索引
D: 给id添加索引


(单选题)7: mysql_connect与@mysql_connect的区别是()。
A: 后者不会忽略错误,将错误显示到客户端
B: 没有区别
C: 前者不会忽略错误,将错误显示到客户端
D: 功能不同的两个函数


(单选题)8: 考虑如下数组$multi_array,怎样才能从数组$multi_array中找出值cat?( ) $multi_array= array(‘red’,’green’,42=>’blue’,’yellow’=>array(‘apple’,9=>’pear’,’banana’,’orange’=>array(‘dog’,’cat’,’iguana’)))
A: $multi_array[‘yellow’][‘apple’][0]
B: $multi_array[‘blue’][0][‘orange’][1]
C: $multi_array[3][3][2]
D: $multi_array[‘yellow’][‘orange'][1]


(判断题)9: PHP是一种嵌入式脚本语言,基于zend引擎
A: 错误
B: 正确


(判断题)10: 可以用添加order条件的方式对查询返回的数据进行过滤
A: 错误
B: 正确


(判断题)11: 自定义函数中,返回函数值的关键字是returns
A: 错误
B: 正确


(判断题)12: PHP中调用某一个对象的方法或属性使用的运算符是=>
A: 错误
B: 正确


(判断题)13: PHP程序中,需要处理的上传数据保存在$_FILES 全局数组
A: 错误
B: 正确


(判断题)14: 在 PHP 中,既可以使用单引号 ( ' ' ) 也可以使用双引号 ( " " ) 来包围字符串
A: 错误
B: 正确


(判断题)15: add 语句能用来向已经存在的表中添加新的记录
A: 错误
B: 正确


(判断题)16: 用foreach循环遍历数组来计算数组所有元素的总和最简单
A: 错误
B: 正确


(判断题)17: 假设$a=5,有$a+=2,则$a的值为5
A: 错误
B: 正确


(判断题)18: 表达式(4>=4)&&(5<=2)将返回假
A: 错误
B: 正确


(判断题)19: php变量使用之前需要定义变量类型
A: 错误
B: 正确


(判断题)20: select不属于数据定义语言
A: 错误
B: 正确

(责任编辑:admin)要这答案加QQ:800020900 或加微信:vq800020900 获取
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
猜您喜欢

提示信息×