PHP习题Word文件下载.docx
- 文档编号:19244260
- 上传时间:2023-01-04
- 格式:DOCX
- 页数:21
- 大小:22.01KB
PHP习题Word文件下载.docx
《PHP习题Word文件下载.docx》由会员分享,可在线阅读,更多相关《PHP习题Word文件下载.docx(21页珍藏版)》请在冰豆网上搜索。
c
style=”font-family,Arial”
font-family=Arial
style=”font-family:
Arial”
font-family;
Arial
6.Whichelementdoyouusetocreateaninternalstylesheet?
css>
link>
style>
styles>
7.Asystemconsistingofaclientandaserverisknownasa____.b
a.mainframetopology
b.double-systemarchitecture
c.two-tiersystem
d.wideareanetwork
8.Whatisusuallytheprimaryroleofaclient?
a.locatingrecordsthatmatcharequest
b.heavyprocessing,suchascalculations
c.datastorage
d.thepresentationofaninterfacetotheuser
9.Whichofthefollowingfunctionsdoestheprocessingtiernothandleinathree-tierclient/serversystem?
a.processingandcalculations
b.readingandwritingofinformationtothedatastoragetier
c.thereturnofanyinformationtotheclienttier
d.datastorage
10.Whichfunctioncanaclientsafelyhandle?
a
a.datavalidation
b.datastorage
c.intensiveprocessing
d.heavycalculations
11.WhichofthefollowingarerequiredtorunPHPscripts?
(Chooseallthatapply.)abcd
a.aWebbrowser
b.aWebserver
c.thePHPsoftware
d.adatabase
12.Acomputercanrefertoitselfusinglocalhostor____.c
a.self
b.this
c.127.0.0.1
d.index.html
13.WhatisthenameofthefileusedforconfiguringPHP?
b
a.php.conf
b.php.ini
c.httpd.conf
d.httpd.ini
14.WhatisthedefaultextensionthatmostWebserversusertoprocessPHPscripts?
a..php
b..html
c..xhtml
d..ini
15.YoucreatelinecommentsinPHPcodebyadding____toalineyouwanttouseasacomment.(Chooseallthatapply.)cd
a.||
b.**
c.#
d.//
第二次
1.Whichofthefollowingisavalidvariablename?
a.SalesOrder
b.salesOrder
c.$SalesOrder
d.$1SalesOrder
2.Youarenotrequiredtoinitializeavariablewhenyoufirstdeclareit.TrueorFalse?
f
3.Whichisthecorrectsyntaxofdeclaringavariableandassigningitastring?
a.$MyVariable=”Hello”;
b.$MyVariable=”Hello”
c.”Hello”=$MyVariable;
d.$MyVariable=Hello;
4.Alooselytypedprogramminglanguage.a
a.doesnotrequiredatatypesofvariablestobedeclared
b.requiresdatatypesofvariablestobedeclared
c.doesnothavedifferentdatatypes
d.doesnothavevariables
5.Howmanydecimalplacesdoesanintegerstore?
a.zero
b.one
c.two
d.asmanyasnecessary
6.Whichofthefollowingisnotafloating-pointnumber?
a.-439.35
b.3.17
c.10
d.-7e11
7.WhichofthefollowingvalusecanbeassignedtoaBooleanvariable?
(Chooseallthatapply.)ab
a.true
b.false
c.1
d.yes
8.InPHP,thevaluesassignedtoarrayelementscanbeofdifferentdatatypes.TrueorFalse?
t
9.Whichofthefollowingreferstothefirstelementinanindexedarraynamed$Emplyees[]?
a.$Emplyees[0]
b.$Emplyees[1]
c.$Emplyees[first]
d.$Emplyees[a]
10.Themodulusoperator(%).d
a.conversanopetandtobase16(hexadecimal)format
b.returnstheabsolutevalueofanoperand
c.calculatesthepercentageofoneoperandcomparedtoanother
d.dividestwooperandsandreturenstheremainder
11.Whicharithmeticoperatorscanbeusedasbothprefixandpostfixoperators?
(Chooseallthatapply.)ab
a.++
b.--
c.+
d.-
12.TheAnd(&
&
)operatorreturnstrueif.c
a.theleftoperandreturnsavalueoftrue
b.therightoperandreturnsavalueoftrue
c.theleftoperandandrightoperandbothreturnavalueoftrue
d.theleftoperandandrightoperandbothreturnavalueoffalse
13.Theorderofpriorityinwhichoperationsinanexpressionareevaluatedisknownas.b
a.prerogativeprecedence
b.operatorprecedence
c.expressionevaluation
d.priorityevaluation
14.Whatisthevalueoftheexpression4*(2+3)?
a.11
b.-11
c.20
d.14
15.WhatisthenameofthefileusedforconfiguringPHP?
a.php.conf
b.php.ini
c.httpd.conf
d.httpd.ini
16.WhatisthedefaultextensionthatmostWebseversusetoprocessPHPscripts?
17.Theecho()andprint()statementsarefunctions.TrueofFalse?
18.WhichofthefollowingarerequiredtorunPHPscripts?
19.Whatdoyouusetoseparatemultipleargumentsthatarepassedtoafunction?
a.aperiod(.)
b.acomma(,)
c.aforwardslash(/)
d.abackwardsslash(\)
20.YoucreatelinecommentsinPHPcodebyaddingtoalineyouwanttouseasacomment.(Chooseallthatapply.)cd
b.**
c.#
d.//
二、写出下面$ReturnValue的值。
1.$ReturnValue=2==3;
2.$ReturnValue=”2”+”3”;
5
3.$ReturnValue=2>
=3;
4.$ReturnValue=2<
5.$ReturnValue=2+3;
6.$ReturnValue=(2>
=3)&
(2>
3);
7.$ReturnValue=(2>
=3)||(2>
第三次
1.A(n)allowsyoutotreatarelatedgroupofPHPcommandsasasingleunit.c
a.statement
b.variable
c.function
d.event
2.Functionsmustcontainparameters.TrueorFalse?
3.Avariablethatisdeclaredoutsideafunctioniscalleda(n)variable.d
a.local
b.class
c.program
d.global
4.Alocalvariablemusebedeclared.c
a.beforeafunction
b.afterafunction
c.withinthebracesofafunctiondefinition
d.withthelocalkeyword
5.Whichofthefollowingautoglobalscanyouusetoaccesssubmittedformvalues(Chooseallthatapply.)ab
a.$_GET
b.$_POST
c.$_SERVER
d.$_REQUEST
6.Whichofthefollowingisthecorrectsyntaxforanifstatement?
a.if($MyVariavle==10);
echo“Yourvariableisequalto10.”;
b.if$MyVariavle==10;
c.if($MyVariavle==10)
d.if($MyVariavle==10),
7.Anifstatementcanincludemultiplestatementsprovidedthatthey.d
a.executeaftertheifstatement’sclosingsemicolon
b.arenotcontainedwithinacommandblock
c.donotincludeotherifstatements
d.arecontainedwithinacommandblock
8.Whichisthecorrectsyntaxforanelseclause?
a.else(echo“Printedfromanelseclause.”);
b.elseecho“Printedfromanelseclause.”;
a.else“echo‘Printedfromanelseclause.’”;
a.else;
echo“Printedfromanelseclause.”;
9.Theswitchstatementcontrolsprogramflowbyexecutingaspecificsetofstatements,depengdingon.d
a.theresultofanif…elsestatement
b.theversionofPHPbeingexecuted
c.whetheranifstatementexecutesfromwithinafunction
d.thevaluereturnedbyaconditionalexpression
10.Decision-makingstructurescannotbenested.TrueofFalse?
11.Whenthevaluereturnedbyaswitchstatementexpressiondoesnotmatchacaselabel,thestatementswithinthelabelexecute.d
a.exception
b.else
c.error
d.default
12.Youcanexitaswitchstatementusinga(n)statement.a
a.break
b.end
c.quit
plete
13.Eachrepetitionofaloopingstatementiscalleda(n).b
a.recurrence
b.iteration
c.duplication
d.reexecution
14.Whichofthefollowingisthecorrectsyntaxforawhilestatement?
a.while($i<
=5,++$i){
echo”<
p>
$i<
/p>
”;
}
b.while($i<
=5){
++i;
c.while($i<
=5);
++$i;
d.while($i<
=5,echo”<
”){
++$i;
15.Countervariables.(Chooseallthatapply.)c
a.canonlybeincremented
b.canonlybedecremented
c.canbechangedusinganyconditionalexpression
d.donotchange
16.Whichofthefollowingisthecorrectsyntaxforaforstatement?
a.for($i=0;
10;
++$i)
echo“Printedfromaforstatement.”;
b.for($i=0,$i<
10,++$i)
c.for{
}while(var$i=0;
d.for($i=0;
10);
17.Whenisaforstatementinitializationexpressionexecuted?
a.whentheforstatementbeginsexecuting
b.witheachrepetitionoftheforstatement
c.whenthecountervariableincrements
d.whentheforstatementends
18.Theforeachstatementcanonlybeusedwitharrays.TrueorFalse?
第四次
1.Whichofthefollowingfunctionstatementsisinvalid?
echo“<
Welcometothe*combatzone*!
echo‘<
Welcometothe“combatzone”!
’;
Welcometothe‘combatzone’!
2.Whichofthefollowingoperatorscanbeusedwithstring?
(Chooseallthatapply.)abc
.
==
.=
+=
3.Whatiftheescapesequenceforasinglequotationmark?
a.\\
b.\’
c.\~
d.Thereisnoescapesequenceforasinglequotationmark
4.Whichofthefollowingcharactersetsdoyouuseforcomplxstringsynax?
a.{}
b.[]
c.()
d.////
5.Ifyouincludeanautoglobalvariablewithinatextstring,youneedtousecomplexstringsynax.TrueorFalse?
6.Whichofthefollowingfunctionsreturnsthenumberofoccurrencesofasubstring?
a.strlen()
b.strspn()
c.substr_count()
d.strcspn()
7.Whichofthefollowingfunctionsperformsacase-sensitivesearchforspecifiedcharactersinastringandreturnsasubstringfromthefirstoccurrenceofthespecifiedcharacterstotheendofstring?
(Chooseallthatapply.)bc
a.substr()
b.strstr()
c.strrchr()
d.strpos()
8.Whichofthefollowingfunctionsallowsyoutoreplacecharacterswithinaspecifiedportionofastring?
a.str_ireplace()
b.str_replace()
c.substr_replace()
d.strstr()
9.Ifyouspecifyanempty
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- PHP 习题