Home Backend Development PHP Tutorial PHP语言综合复习测试 试题(六)

PHP语言综合复习测试 试题(六)

Jun 06, 2016 pm 03:35 PM

PHP语言综合复习测试 试题(六) 一、单项选择题 (共52小题) 1、 D01EA1001 关于信息采集下面说法正确的是( ) (1分) A、file_get_contents可以采集到网页中引入的css或者js B、如果通过浏览器直接访问一个url地址能够显示图片,那么通过file_get_contents直接采集这个url可以直接获取到图片文件 C、PDO是一个信息采集类可以很方便的采集信息 D、通过fsockopen等函数可以实现信息采集

2012年8月份软工学院PHP专业阶段1109PHPA班

PHP语言综合复习测试 试题(六)

一、单项选择题 (共52小题)

1、 D01EA1001 关于信息采集下面说法正确的是( ) (1分)

A、file_get_contents可以采集到网页中引入的css或者js

B、如果通过浏览器直接访问一个url地址能够显示图片,那么通过file_get_contents直接采集这个url可以直接获取到图片文件

C、PDO是一个信息采集类可以很方便的采集信息 D、通过fsockopen等函数可以实现信息采集 2、D01MA2002 下列说法正确的是 ( ) (2分)

A、Snoopy是一个信息采集类,该类已经集成到php的扩展中了,可以在任何文件中通过new snoopy();来实例化该类

B、使用snoopy可以实现伪造访问来源地址的功能

C、Snoopy可以实现采集,但不能实现类似提交表单的功能

D、Snoopy中有一个fetch方法,调用该方法可直接返回采集到的数据 3、 D01MA2003 下列说法正确的是 ( ) (2分)

A、如果不使用snoopy那么只有file_get_contents函数可以实现信息采集 B、通过采集得到的数据可以显示到页面上也可以保存到数据库或者保存到文件 C、采集只能采集本地服务器的数据,不能采集外网的数据

D、如果一个网站语言是jsp,那么就无法通过php程序采集到数据 4、 D01MA2004 下列说法正确的是( ) (2分)

A、Snoopy中有一个submit方法,可以实现类似表单提交的功能 B、Snoopy中有一个fetchlinks方法,该方法等同于fetch

C、Snoopy中有一个fetchtext方法该方法用户获取页面上的输入框数据 D、Snoopy中的fetchform方法也可以实现类似表单提交的功能 5、 D01MA2005 下列说法正确的是( )(2分)

A、snoopy可以实现文件上传的功能 B、 使用snoopy前可以不实例化该类 C、Snoopy是数据库操作类和采集类的集合 D、Snoopy类是C语言写的 6、 D01EA1006 下列说法正确的是( ) (1分)

A、Curl系列函数可以实现模拟表单提交的功能 B、Curl系列函数只能以get方式模拟表单提交

C、如果要通过php来模拟表单提交只能通过curl系列函数 D、如果使用curl系列函数模拟表单提交,则只能提交一个数据 7、 D01EA1007 下列说法正确的是( ) (1分)

A、使用curl系列函数必须引入snoopy类才可以 B、使用curl系列函数必须开启memcache扩展 C、使用curl系列函数必须开启PDO扩展 D、Curl系列函数可以实现信息采集的功能 8、 D02MA2008 下列说法正确的是( )(2分)

A、在实现网站的纯静态化时通常使用session_start()函数 B、如果实现了网站的纯静态化则每个页面不能出现漂浮的版块 C、当访问一个纯静态页面时不会查询数据库

D、一般来说纯静态化有利于搜索优化,但不能减轻服务器压力 9、 D02MA2010 有一段程序

echo 1; $data = ob_get_contents(); echo $data;

请写出输出结果( ) (2分) A、1 B、2 C、11 D、空白 10、D02MA2011 下列说法正确的是( ) (2分)

A、在实现纯静态化时必须使用ob_clean这个函数,否则将不能生成静态页面 B、静态页面一旦生成就不能再覆盖了

C、生成静态页面后页面文件就和数据库有了关联,当数据库中的数据发生变化时,静态页面也会随之发生更新

D、 当访问静态页面时,在静态页面也可以引入css,js等文件 11、D03EA1012 下列说法正确的是( ) (1分)

A、url重写功能可以实现网站的伪静态 B、Url重写功能可以在php代码中实现

C、使用了url重写后,在代码中不能存在连接数据库的代码 D、Url重写可以实现纯静态化

12、D03MA1013 下列说法正确的是( ) (2分)

A、在php文件中编写 RewriteEngine On 就可以开启url重写功能了 B、在php、ini中编写RewriteEngine On 就可以开启url重写功能了

C、Url重写不依赖任何配置,只要将、htaccess文件放在网站的目录下就可以了 D、 修改了、htaccess文件不用重启apache就可以生效 13、D04EA1014 下列说法正确的是( )(1分)

A、Memcache服务器是缓存服务器,必须和apache服务器安装在同一台机器上 B、Memcache服务器缓存数据的有效期最长不超过24小时 C、Memcache服务器只能运行在windows下

D、一个php程序可以可以从多台memcache服务器上获取数据 14、D04EA1015 下列说法正确的是( ) (1分)

A、使用memcache服务器的目的是解决硬盘空间不够用的问题

B、如果php和memcache服务器运行在不同的服务器上则无法对memcache服务器进行存取数据的操作

C、Memcache服务器中的数据是随着数据库的更新同步更新的 D、使用memcache服务器可以减轻数据库服务器的压力 15、D04MA2016 下列说法正确的是( ) (2分)

A、在使用memcache缓存数据时,通常是程序先在数据库中查询再到memcache中查询

B、在使用memcache时,通常是程序先在memcache中查询,如果获取不到数据才会在数据库中查询 C、在使用memcache时,为了确保数据准确每次执行程序都会访问一次数据库,并且将数据库中的数据和memcache中的数据进行对比

D、 在使用memcache时,程序会随机访问memcache服务器或者数据库,这样能够保证访问压力的均衡

16、D04MA2017 下列说法正确的是( ) (2分)

A、PHP默认是支持memcache的不需要任何扩展的配置 B、PHP操作memcache时必须引入PDO类才可以

C、数据一旦存储到memcache服务器中就无法再次修改,除非过期 D、数据存储到memcache服务器后可以在未过期前进行删除操作 17、D04MA2018 下列说法正确的是 ( ) (2分)

A、通过get方法可以获取memcache中已经过期的数据

B、一个数组$a = array('id'=>'10','user'=>'zhangsan');可以通过unset($a['zhangsan']);将数组变为array('id'=>10);

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1248
24
PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1? Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1? Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

How does PHP type hinting work, including scalar types, return types, union types, and nullable types? How does PHP type hinting work, including scalar types, return types, union types, and nullable types? Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

See all articles