php开源问答_PHP基础知识能力问答

php开源问答

This section contains Aptitude Questions and Answers on PHP Basics.

本部分包含有关PHP基础知识的 Aptitude问题和解答。

1) There are the following statements that are given below, which of them are correct PHP?
  1. PHP stands for the Preprocessor Home page.

  2. PHP is a scripting language.

  3. PHP is a client-side hypertext language.

  4. PHP is used to make dynamic and interactive pages.

Options:

  1. A and C

  2. B and D

  3. A, B, and C

  4. A, B, C, and D

Answer & Explanation

Correct answer: 2
B and D

Statements B and D are correct about PHP.

1)下面给出了以下语句,其中哪些是正确PHP?
  1. PHP代表预处理器主页。

  2. PHP是一种脚本语言。

  3. PHP是一种客户端超文本语言。

  4. PHP用于制作动态和交互式页面。

选项:

  1. A和C

  2. B和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:2
B和D

语句B和D关于PHP是正确的。

2) PHP stands for?
  1. Preprocessor Home Page

  2. Personal Home Page

  3. Hypertext Preprocessor

  4. Preprocessor Hypertext Page

Options:

  1. A and B

  2. A and C

  3. B and C

  4. C and D

Answer & Explanation

Correct answer: 3
B and C

Previously PHP stands for "Personal Home Page" and now, it is called "Hypertext Preprocessor".

2)PHP代表什么?
  1. 预处理器主页

  2. 个人主页

  3. 超文本预处理器

  4. 预处理程序超文本页面

选项:

  1. A和B

  2. A和C

  3. B和C

  4. C和D

答案与解释

正确答案:3
B和C

以前, PHP代表“个人主页” ,现在被称为“ 超文本预处理器”

3) Can we create a web-service in PHP?
  1. Yes

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, we can create a web-service in PHP.

3)我们可以用PHP创建一个Web服务吗?
  1. 没有

答案与解释

正确答案:1

是的,我们可以使用PHP创建一个Web服务。

4) What is the extension is used for PHP scripting files?
  1. .php

  2. .ph

  3. .p

  4. .phtml

Answer & Explanation

Correct answer: 1
.php

The .php extension is used for PHP scripting files.

4)PHP脚本文件使用的扩展名是什么?
  1. .php

  2. .ph

  3. .p

  4. .phtml

答案与解释

正确答案:1
.php

.php扩展名用于PHP脚本文件。

5) Can we generate an executable file after the compilation of PHP code?
  1. Yes

  2. No

Answer & Explanation

Correct answer: 2
No

No, PHP is a scripting language so that we can generate an executable file.

5)我们可以在编译PHP代码后生成可执行文件吗?
  1. 没有

答案与解释

正确答案:2
没有

不,PHP是一种脚本语言,因此我们可以生成一个可执行文件。

6) Which of the following are popular frameworks used in PHP?
  1. CakePHP

  2. FuelPHP

  3. Zend

  4. Yii

Options:

  1. A and B

  2. C and D

  3. A, B, and C

  4. A, B, C, and D

Answer & Explanation

Correct answer: 4
A, B, C, and D

All given options are popular frameworks used in PHP.

6)以下哪种流行PHP框架?
  1. CakePHP

  2. FuelPHP

  3. 曾德

  4. i

选项:

  1. A和B

  2. C和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:4
A,B,C和D

所有给定的选项都是PHP中使用的流行框架。

7) A PHP file can contain?
  1. HTML code

  2. Windows Application code

  3. Java-script code

  4. PHP code

Options:

  1. A and B

  2. A, B, and C

  3. A, C, and D

  4. A, B, C, and D

Answer & Explanation

Correct answer: 3
A, C, and D

A PHP file can contain HTML, Java-script, and PHP code.

7)一个PHP文件可以包含吗?
  1. HTML代码

  2. Windows应用程序代码

  3. Java脚本代码

  4. PHP代码

选项:

  1. A和B

  2. A,B和C

  3. A,C和D

  4. A,B,C和D

答案与解释

正确答案:3
A,C和D

一个PHP文件可以包含HTML,Java脚本和PHP代码。

8) Which of the following can be done by PHP code?
  1. Creation of dynamic WebPages.

  2. Add, delete, and modify data in the database.

  3. Encryption and decryption of data.

  4. PHP can send and receive cookies.

Options:

  1. A and B

  2. C and D

  3. A, B, and C

  4. A, B, C, and D

Answer & Explanation

Correct answer: 4
A, B, C, and D

All given tasks can be performed by the PHP code.

8)以下哪项可以通过PHP代码完成?
  1. 创建动态网页。

  2. 添加,删除和修改数据库中的数据。

  3. 数据加密和解密。

  4. PHP可以发送和接收Cookie。

选项:

  1. A和B

  2. C和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:4
A,B,C和D

所有给定的任务都可以由PHP代码执行。

9) PHP supports AJAX?
  1. Yes

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, PHP supports AJAX.

9)PHP是否支持AJAX?
  1. 没有

答案与解释

正确答案:1

是的,PHP支持AJAX。

10) Which of the following operating systems can run PHP scripts?
  1. MAC OS X

  2. Windows

  3. Linux

  4. Unix

Options:

  1. A and B

  2. C and D

  3. A, B, and C

  4. A, B, C, and D

Answer & Explanation

Correct answer: 4
A, B, C, and D

All given operating systems can run PHP scripts.

10)以下哪些操作系统可以运行PHP脚本?
  1. MAC OS X

  2. 视窗

  3. 的Linux

  4. Unix系统

选项:

  1. A和B

  2. C和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:4
A,B,C和D

所有给定的操作系统都可以运行PHP脚本。

11) Which of the following web-server is used for PHP scripts?
  1. Tomcat

  2. IIS

  3. Apache

  4. Cassini

Answer & Explanation

Correct answer: 3
Apache

The Apache web-server is used for PHP scripts.

11)以下哪个Web服务器用于PHP脚本?
  1. Tomcat

  2. IIS

  3. 阿帕奇

  4. 卡西尼号

答案与解释

正确答案:3
阿帕奇

Apache Web服务器用于PHP脚本。

12) Which of the following are software bundle is used for PHP and its related software's?
  1. LAMP

  2. WAMP

  3. LANP

  4. MAMP

Options:

  1. A and B

  2. C and D

  3. A, B, and D

  4. B, C, and D

Answer & Explanation

Correct answer: 3
A, B, and D

The LAMP, WAMP, and MAMP software bundle are used for installing PHP and related software.

12)以下哪个软件包用于PHP及其相关软件?
  1. WAMP

  2. 局域网

  3. 曼普

选项:

  1. A和B

  2. C和D

  3. A,B和D

  4. B,C和D

答案与解释

正确答案:3
A,B和D

LAMPWAMPMAMP软件包用于安装PHP和相关软件。

13) What is 'M' stands for in LAMP?
  1. Markup

  2. MySQL

  3. Most

  4. Microsoft

Answer & Explanation

Correct answer: 2
MySQL

The "M" stands for MySQL in LAMP. LAMP is a software bundle to install PHP, MySQL on the Linux operating system.

13)“ L”在LAMP中代表什么?
  1. 标记

  2. MySQL

  3. 微软

答案与解释

正确答案:2
MySQL

“ M”代表LAMP中的MySQL 。 LAMP是一个软件包,用于在Linux操作系统上安装PHP,MySQL。

14) What the full form of 'P' can be in the WAMP?
  1. PHP

  2. Python

  3. Perl

  4. All of the above

Answer & Explanation

Correct answer: 4
All of the above

The full form of "P" can be PHP, Python, and Perl in the WAMP.

14)WAMP中的“ P”的完整形式是什么?
  1. PHP

  2. Python

  3. Perl

  4. 上述所有的

答案与解释

正确答案:4
上述所有的

“ W”的完整形式可以是WAMP中的PHPPythonPerl

15) Can we place a PHP script anywhere in the ".php" file?
  1. Yes

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, we can place the PHP script anywhere in the ".php" file.

15)我们可以在“ .php”文件中的任何位置放置PHP脚本吗?
  1. 没有

答案与解释

正确答案:1

是的,我们可以将PHP脚本放置在“ .php”文件中的任何位置。

16) Which of the following functions are used to print text on the webpage?
  1. print

  2. echo

  3. disp

  4. disptext

Options:

  1. Only A

  2. Only B

  3. A and B

  4. C and D

Answer & Explanation

Correct answer: 3
A and B

The print and echo functions are used to print text on the webpage.

16)以下哪些功能用于在网页上打印文本?
  1. 打印

  2. 回声

  3. 显示

  4. 散文

选项:

  1. 只有一个

  2. 只有B

  3. A和B

  4. C和D

答案与解释

正确答案:3
A和B

打印和回显功能用于在网页上打印文本。

17) What is the correct output of the given code snippets in PHP?
<?php

    $NUM1=5;
    $NUM2=10;
    
    
    $Sum =$NUM1 + $NUM2;
    
    print "Sum is: "+$Sum;
    
?>

  1. Sum is: 15

  2. Print '15' with a warning

  3. Syntax error

  4. None of the above

Answer & Explanation

Correct answer: 2
Print '15' with a warning

The above code will print "15" with a warning.

17)PHP中给定代码段的正确输出是什么?
 <?php 

     $NUM1 = 5 ; 
     $NUM2 = 10 ; 
    
    
     $Sum   = $NUM1   +   $NUM2 ; 
    
     print   "Sum is: " + $Sum ; 
    
?>

  1. 总和是:15

  2. 印有警告的'15'

  3. 语法错误

  4. 以上都不是

答案与解释

正确答案:2
印有警告的'15'

上面的代码将显示“ 15”并显示警告。

18) What is the correct output of the given code snippets in PHP?
<?php

    $NUM1=5;
    $NUM2=10;
    
    
    $Sum =$NUM1 + $NUM2;
    
    print 'Sum is: '.$Sum;
    
?>

  1. Sum is: 15

  2. Print '15' with a warning

  3. Syntax error

  4. None of the above

Answer & Explanation

Correct answer: 1
Sum is: 15

The above code will print the 'Sum is: 15' on the webpage.

18)PHP中给定代码段的正确输出是什么?
  1. 总和是:15

  2. 印有警告的'15'

  3. 语法错误

  4. 以上都不是

答案与解释

正确答案:1
总和是:15

上面的代码将在网页上打印“ Sum is:15”。

19) PHP is a case sensitive language for inbuilt functions?
  1. Yes

  2. No

Answer & Explanation

Correct answer: 2
No

No, PHP is not a case sensitive language for inbuilt functions.

19)PHP是内置函数的区分大小写的语言吗?
  1. 没有

答案与解释

正确答案:2
没有

不,对于内置函数,PHP不是区分大小写的语言。

20) What is the correct output of the given code snippets in PHP?
<?php
    echo '<b>'.'Hello World'.'</b>';
?>

  1. Print "<b>Hello World</b>" on the webpage.

  2. Print "Hello World" in bold style on the webpage.

  3. Print "Hello World" without bold style on the webpage.

  4. None of the above

Answer & Explanation

Correct answer: 2
Print "Hello World" in bold style on the webpage.

The above code will print "Hello World" in bold style on the webpage.

20)PHP中给定代码段的正确输出是什么?
  1. 在网页上打印“ <b> Hello World </ b>”。

  2. 在网页上以粗体打印“ Hello World”。

  3. 在网页上打印不带粗体的“ Hello World”。

  4. 以上都不是

答案与解释

正确答案:2
在网页上以粗体打印“ Hello World”。

上面的代码将在网页上以粗体显示“ Hello World”。

21) Which of the following ways are used to comment a single line in PHP?
  1. # commented line

  2. // commented line

  3. 'commented line

  4. : commented line

Options:

  1. Only A

  2. Only B

  3. A and B

  4. C and D

Answer & Explanation

Correct answer: 3
A and B

Options A and B are used to comment a single line in PHP code.

21)以下哪种方式在PHP中注释了一行?
  1. #注释行

  2. //注释行

  3. '注释行

  4. :评论行

选项:

  1. 只有一个

  2. 只有B

  3. A和B

  4. C和D

答案与解释

正确答案:3
A和B

选项A和B用于在PHP代码中注释一行。

22) What is the correct output of the given code snippets in PHP?
<?php

    $NUM1=5;
    $NUM2=10;
    
    
    $Sum =$NUM1 /*5+10=15*/+ $NUM2;
    
    print "Sum is: ".$Sum;
    
?>

  1. Sum is: 15

  2. Print "15" with warning

  3. Syntax error

  4. None of the above

Answer & Explanation

Correct answer: 1
Sum is: 15

The above code will print the "Sum is: 15" on the webpage.

22)PHP中给定代码段的正确输出是什么?
  1. 总和是:15

  2. 打印“ 15”并显示警告

  3. 语法错误

  4. 以上都不是

答案与解释

正确答案:1
总和是:15

上面的代码将在网页上打印“ Sum is:15”。

23) What is the correct output of the given code snippets in PHP?
<?php

    int $NUM1=5;
    int $NUM2=10;
    
    
    $Sum =$NUM1 /*5+10=15*/+ $NUM2;
    
    print "Sum is: ".$Sum;
    
?>

  1. Sum is: 15

  2. Print "15" with warning

  3. Syntax error

  4. None of the above

Answer & Explanation

Correct answer: 3
Syntax error

The above code will generate a syntax error.

23)PHP中给定代码段的正确输出是什么?
  1. 总和是:15

  2. 打印“ 15”并显示警告

  3. 语法错误

  4. 以上都不是

答案与解释

正确答案:3
语法错误

上面的代码将生成语法错误。

24) What is the correct output of the given code snippets in PHP?
<?php

    $NUM1=5;
    $NUM2=10;
    
    
    $Sum =$NUM1 + $NUM2;
    
    print "Sum is: ".$sum;
    
?>

  1. Sum is: 15

  2. Syntax error

  3. Sum is:

  4. None of the above

Answer & Explanation

Correct answer: 3
Sum is:

The above code will print "Sum is:" on the webpage because variable names are case-sensitive in PHP language.

24)PHP中给定代码段的正确输出是什么?
  1. 总和是:15

  2. 语法错误

  3. 总和是:

  4. 以上都不是

答案与解释

正确答案:3
总和是:

上面的代码将在网页上显示“ Sum is:”,因为变量名称在PHP语言中区分大小写。

25) What is the correct output of the given code snippets in PHP?
<?php

    $NUM1=5;
    $NUM2=10;
    
    
    $Sum =$NUM1 + $NUM2;
    
    print "Sum is: $Sum";
    
?>

  1. Sum is: 15

  2. Syntax error

  3. Sum is:

  4. None of the above

Answer & Explanation

Correct answer: 1
Sum is: 15

The above code will print the "Sum is: 15" on the webpage.

25)PHP中给定代码段的正确输出是什么?
  1. 总和是:15

  2. 语法错误

  3. 总和是:

  4. 以上都不是

答案与解释

正确答案:1
总和是:15

上面的代码将在网页上打印“ Sum is:15”。

26) Is it true the "echo" statement has no return value while "print" has return value?
  1. Yes

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, the given statement is true.

26)“ echo”语句没有返回值而“ print”具有返回值是真的吗?
  1. 没有

答案与解释

正确答案:1

是的,给定的陈述是正确的。

翻译自: https://www.includehelp.com/php/basics-aptitude-questions-and-answers.aspx

php开源问答

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ask2问答系统是以php+MySQL进行开发的php问答系统源码。 ask2问答系统于2016年3月28发布开源,第一个版本V3.0,内置三套PC模板, default默认是百度问答模板 sowenda是高仿360问答的。 soso模板是仿腾讯soso问答界面。 一套wap模板,仿天涯问答的手机版。 pc和wap模板后台设置里自由切换,还可以绑定手机独立二级域名。 强大的搜索功能,支持xunsearch全文检索,seo友好,强大的标签自动识别功能,内置标签库,还有seo相关的优化,无需小白操心。 内置超强采集,好几十个问答网站规则内置,无需编写,支持防采集网站采集,2天采集30万数据不成问题。 ask2问答系统 更新日志: 1、采用全新的ZUI框架开发前端模板,zui基于bootstrap开发,完美兼容bt,并且扩展了更丰富的UI组件. 2、完善细节,从站内检索功能到seo站内聚合,一一做到。 3、支持积分充值,后台可配置支付宝设置,用户中心右侧导航选择积分充值即可。 4、强化编辑器功能,采用百度最新的UEditor编辑器,支持各种图片上传,还可以直接复制图片本地化保存,太完美了。 5、增加用户专栏,文章聚合,专栏展示用户文章,专栏首页随机切换内容,完爆seo,让爬虫每次光顾都能抓取不同内容,收录杠杠的。 6、后台界面大更新,焕然一新,并支持文章和问题百度推送 7、后台增加在线模板管理 8、采集功能进一步强化,支持各种浏览器在线采集,上百个采集规则随便选,上百个,你没看错,各类行业问答网站均包括在内,你不要问百度,搜搜,360问答,知乎这些了,小儿科。 9、完美支持广告投放,后台可以配置。 10、后台支持logo和banner大图配置,无需在繁琐的ftp上传 11、支持各类cms后台配置整合和dz整合,一键搞定 2016年11月1号更新: 1、强化验证码,防止绕过验证码发垃圾数据 2、增加根据用户等级设置不同角色能提问和回答问题数目限制,防止用户恶意发送内容 3、修改部分小bug
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值