php和mysql web开发外文翻译 2.docx

上传人:b****3 文档编号:4080713 上传时间:2023-05-06 格式:DOCX 页数:14 大小:29.61KB
下载 相关 举报
php和mysql web开发外文翻译 2.docx_第1页
第1页 / 共14页
php和mysql web开发外文翻译 2.docx_第2页
第2页 / 共14页
php和mysql web开发外文翻译 2.docx_第3页
第3页 / 共14页
php和mysql web开发外文翻译 2.docx_第4页
第4页 / 共14页
php和mysql web开发外文翻译 2.docx_第5页
第5页 / 共14页
php和mysql web开发外文翻译 2.docx_第6页
第6页 / 共14页
php和mysql web开发外文翻译 2.docx_第7页
第7页 / 共14页
php和mysql web开发外文翻译 2.docx_第8页
第8页 / 共14页
php和mysql web开发外文翻译 2.docx_第9页
第9页 / 共14页
php和mysql web开发外文翻译 2.docx_第10页
第10页 / 共14页
php和mysql web开发外文翻译 2.docx_第11页
第11页 / 共14页
php和mysql web开发外文翻译 2.docx_第12页
第12页 / 共14页
php和mysql web开发外文翻译 2.docx_第13页
第13页 / 共14页
php和mysql web开发外文翻译 2.docx_第14页
第14页 / 共14页
亲,该文档总共14页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

php和mysql web开发外文翻译 2.docx

《php和mysql web开发外文翻译 2.docx》由会员分享,可在线阅读,更多相关《php和mysql web开发外文翻译 2.docx(14页珍藏版)》请在冰点文库上搜索。

php和mysql web开发外文翻译 2.docx

php和mysqlweb开发外文翻译2

外文翻译-原文部分

LauraThomsonphpandmysqlwebdevelop

PHPisascriptinglanguageoriginallydesignedforproducingdynamicwebpagesIthasevolvedtoincludeacommandlineinterfacecapabilityandcanbeusedinstandalonegraphicalapplications.

WhilePHPwasoriginallycreatedbyRasmusLerdorfin1995,themainimplementationofPHPisnowproducedbyThePHPGroupandservesasthedefactostandiirdforPHPasthereisnoformalspecification.PHPisfreesoftwarereleasedunderthePHPLicense,howeveritisincompatiblewiththeGNUGeneralPublicLicense(GPL),duetorestrictionsontheusageofthetermPHP.

PHPisawidely-usedgeneral-purposescriptinglanguagethatisespeciallysuitedforwebdevelopmentandcanbeembeddedintoHTML.Itgenerallyrunsonawebserver,takingPHPcodeasitsinputandcreatingwebpagesasoutput.Itcanbemillionwebsitesand1millionwebservers.

PHPoriginallystoodforPersonalHomePage,Itbeganin1994asasetofCommonGatewayInterfacebinarieswrittenintheCprogramminglanguagebytheDanish/GreenlandicprogrammerRasmusLerdorf.LerdorfinitiallycreatedthesePersonalHomePageToolstoreplaceasmallsetofPerlscriptshehadbeenusingtomaintainhispersonalhomepage.Thetoolswereusedtoperformtaskssuchasdisplayinghisrdsum^andrecordinghowmuchtraffichispagewasreceiving.HecombinedthesebinarieswithhisFonnInterpretertocreatePHP/FI,whichhadmorefunctionality.PHP/FIincludedalargerimplementationfortheCprogramminglanguageandcouldcommunicatewithdatabases,enablingthebuildingofsimple,dynamicwebapplications.lerdorfreleasedPHPpubliclyonJune8,1995toacceleratebuglocationandimprovethecode.ThisreleasewasnamedPHPversion2andalreadyhadthebasicfunctionalitythatPHPhastoday.ThisincludedPerl-likevariables,formhandling,andtheabilitytoembedHTML.ThesyntaxwassimilartoPerlbutwasmorelimited,simpler,andlessconsistent.

ZeevSuraskiandAndiGutmans,twoIsraelidevelopersattheTechnionIIT,rewrotetheparserin1997andformedthebaseofPHP3,changingthelanguage'snametotherecursiveinitialismPHP:

HypertextPreprocessor.ThedevelopmentteamofficiallyreleasedPHP/FI2inNovember1997aftermonthsofbetatesting.Afterwards,publictestingofPHP3began,andtheofficiallaunchcameinJune1998.wSuraskiandGutmansthenstartedanewrewriteofPHP'score,producingtheZendEnginein1999.TheyalsofoundedZendTechnologiesinRamatGan,Israel.

OnMay22,2000,PHP4,poweredbytheZendEngine1•0,wasreleased.OnJuly13,2004,PHP5wasreleased,poweredbythenewZendEngineII.PHP5includednewfeaturessuchasimprovedsupportforobject-orientedprogramming,thePHPData

Objectsextension(whichdefinesalightweightandconsistentinterfaceforaccessingdatabases),andnumerousperformanceenhancements.ThemostrecentupdatereleasedbyThePHPGroupisfortheolderPHPversion4codebranch.AsofAugust,2008thisbranchisuptoversion4.4.9.PHP4isnolongerunderdevelopmentnorwillanysecurityupdatesbereleased.

In2008,PHP5becametheonlystableversionunderdevelopment.LatestaticbindinghasbeenmissingfromPHPandwillbeaddedinversion5.3.PHP6isunderdevelopmentalongsidePHP5.Majorchangesincludetheremovalofregister_globals,magicquotes,andsafemode.Thereasonfortheremovalswasbecauseregister_globalshadgivenwaytosecurityholes,andmagicquoteshadanunpredictablenature,andwasbestavoided.Instead,toescapecharacters,magicquotesmaybesubstitutedwiththeaddslashes()function,ormoreappropriatelyanescapemechanismspecifictothedatabasevendoritselflikemysql_rcal_escape_string()forMySQL.

PHPdoesnothavecompletenativesupportforUnicodeormultibytestrings;UnicodesupportwillbeincludedinPHP6.ManyhighprofileopensourceprojectsceasedtosupportPHP4innewcodeasofFebruary5,2008,duetotheGoPHP5initiative,providedbyaconsortiumofPHPdeveloperspromotingthetransitionfromPHP4toPHP1397Itrunsinboth32-bitand64-bitenvironments,butonWindowstheonlyofficialdistributionis32-bit,requiringWindows32-bitcompatibilitymodetobeenabledwhileusingIISina64-bitWindowsenvironment.Thereisathird-partydistributionavailablefor64-bitWindows.

PHPisageneral-purposescriptinglanguagethatisespeciallysuitedforwebdevelopment.PHPgenerallyrunsonawebserver,takingPHPcodeasitsinputandcreatingwebpagesasoutput.Itcanalsobeusedforcommand-linescriptingandclient-sideGUIapplications.PHPcanbedeployedonmostwebservers,manyoperatingsystemsandplatforms,andcanbeusedwithmanyrelationaldatabasemanagementsystems.Itisavailablefreeofcharge,andthePHPGroupprovidesthecompletesourcecodeforuserstobuild,customizeandextendfortheirownuse.

PHPprimarilyactsasafilter,takinginputfromafileorstreamcontainingtextand/orPHPinstructionsandoutputsanotherstreamofdata;mostcommonlytheoutputwillbeHTML.Itcanautomaticallydetectthelanguageoftheuser.FromPHP4,thePHPparsercompilesinputtoproducebylecodeforprocessingbytheZendEngine,givingimprovedperformanceoveritsinterpreterpredecessor.

Originallydesignedtocreatedynamicwebpages,PHP’sprincipalfocusisserver-sidescripting,anditissimilartootherserver-sidescriptinglanguagesthatprovidedynamiccontentfromawebservertoaclient,suchasMicrosoft’sActiveServerPages,SunMicrosystems1JavaServerPages,andmod_perl.PHPhasalsoattractedthedevelopmentofmanyframeworksthatprovidebuildingblocksandadesignstructuretopromoterapidapplicationdevelopment(RAD).SomeoftheseincludeCakePHP,Symfony,Codeigniter,andZendFramework,offeringfeaturessimilartootherwebapplicationframeworks-

TheLAMParchitecturehasbecomepopularinthewebindustryasawayofdeployingvvebapplications.PHPiscommonlyusedasthePinthisbundlealongsideLinux,ApacheandMySQL,althoughthePmayalsorefertoPythonorPerl.

AsofApril2007,over20millionInternetdomainswerehostedonserverswithPHPinstalled,andPHPwasrecordedasthemostpopularApachemodule.SignificantwebsitesarcwritteninPHPincludingtheuser-facingportionofFaccbook,Wikipedia,PHPcanbeusedtocreatestand-alone,compiledapplicationsandlibraries,itcanbeusedforshellscripting,andthePHPbinariescanbecalledfromthecommandline.

Aswithmanyscriptinglanguages,PHPscriptsarenormallykeptashuman-readablesourcecode,evenonproductionwebservers.Inthiscase,PHPscriptswillhecompiledatruntimebythePHPengine,whichincreasestheirexecutiontime.PHPscriptsareabletobecompiledbeforeruntimeusingPHPcompilersaswithotherprogramminglanguagessuchasC(thelanguagePHPanditsextensionsarewrittenin).

Codeoptimizersaimtoreducethecomputationalcomplexityofthecompiledcodebyreducingitssizeandmakingotherchangesthatcanreducetheexecutiontimewiththeoverallgoalofimprovingperformance.ThenatureofthePHPcompilerissuchthatthereareoftenopportunitiesforcodeoptimization,andanexampleofacodeoptimizeristheZendOptimizerPHPextension.

AnotherapproachforreducingoverheadforhighloadPHPserversisusingPHPaccelerators.ThesecanoffersignificantperformancegainsbycachingthecompiledformofaPHPscriptinsharedmemorytoavoidtheoverheadofparsingandcompilingthecodeeverytimethescriptruns.

TheNationalVulnerabilityDatabasestoresallvulnerabilitiesfoundincomputersoftware.TheoverallproportionofPHP-relatedvulnerabilitiesonthedatabaseamountedto:

12%in2003,20%in2004,28%in2005,43%in2006,36%in2007,and35%in2008.MostofthesePHP-relatedvulnerabilitiescanbeexploitedremotely:

theyallowhackerstostealordestroydatafromdatasourceslinkedtotheWebserver(suchasanSQLdatabase),sendspamorcontributetoDOSattacksusingmalware,whichitselfcanbeinstalledonthevulnerableservers.

Thesevulnerabilitiesarccausedmostlybynotfollowingbestpracticeprogrammingrules:

technicalsecurityflawsofthelanguageitselforofitscorelibrariesarenotfrequent.Recognizingthatprogrammerscannotbetrusted,somelanguagesincludetaintcheckingtodetectautomaticallythelackofinputvalidationwhichinducesmanyissues.SuchafeatureisbeingdevelopedforPHP.AllhoughitmaybeincludedinmainstreamPHPinafuturerelease,itsinclusionhasbeenrejectedseveraltimesinthepast.

HostingPHPapplicationsonaserverrequiresacarefulandconstantattentiontodealwiththesesecurityrisks.ThereareadvancedprotectionpatchessuchasvSuhosinandHardening-Patch,especiallydesignedforwebhostingenvironments.InstallingPHPasaCGIbinaryratherthanasanApachemoduleisthepreferredmethodforaddedsecurity.

Withrespecttosecuringthecodeitself,PHPcodecanbeobfuscatedtomakeitdifficulttoreadwhileremainingfunctional.

Syntax-highlightedPHPcodeembeddedwithinHTMLPHPonlyparsescodewithinitsdelimiters.AnythingoutsideitsdelimitersissentdirectlytotheoutputandisnotparsedbyPHP.Themostcommondelimitersare

phpand?

>,whichareopenandclosedelimitersrespectively.〈scriptlanguage="php">anddelimitersarealsoavailable.ShorttagscanbeusedtostartPHPcode,

or

=(whichisusedtoechobackastringorvariable)andthetagtoendPHPcode,?

>.Thesetagsarccommonlyused,butlikeASP-styletags(<%or<%=and%>),theyarelessportableastheycanbedisabledinthePHPconfiguration.Forthisreason,theuseofshorttagsandASP-styletagsisdiscouraged.Thepuipo

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2