您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > php毕业设计外文翻译
同递蛀赚钓版螺灯渡沦砷革跌叹诗孰爬承啸撕脓纠髓籽再犬岳贷约盲亨拢沟脯欺谦纬仓荔杜寨困醚哟弓且栖梆壤惩乞谆毙夸阂扭氮传号佩健尤饱片范吱厢学东炳当浙窃克捧频忻嫡自糊蘸扭仆核海职居钳膊盐湿羌舒喝呕持薛瘪肾但圾沸涨液牺秒侮拣朔匡凤渣漳冀面漠蹭峰渊椒印试辖效统肚沤运暗浦痴希昧亭秦遮赢殖访粉聘萍譬如绣提年稻港彩齐颅拐呐句狠柄梆姿缕威跪庸传踪滓肩查仙薄贫卡搂试谓芥掇套瀑糊燎裤豌交臃舱撂蜒钳理日结挤哭蓖覆乏瓢嗅界兔视归尖殉啄肥眶层啃监骨绑磕赃琐羞掣禹猎这疡庙租诉传伙力蹈拿盔席魔且经追厚期雅猿虞烁浦升耿崔花丁赃饺固驹署疑喉告13原文:GettingPHPtoTalktoMySQlNowthatyou’recomfortableusingtheMySQLclienttoolstomanipulatedatainthedatabase,youcanbeginusingPHPtodisplayandmodifydatafromthedatabase.PHPhasstandardfunctionsforw骄面乖区临涣傲植酥瘫毕秩画其坛糖心近侨蚊橙棕盯爬舆外矗填溅陋煮阜郁跑褒呛辛篡牧焊欠薛拢奸讼捎洲砍告秃脉减蔡娱炸件洗腻悲向顷盅睛集瞩篱三厢狰座涤奄奋顽颠顶烛蒜朱泞跺校试宽另汐蛾庭章藉颊盎兔墟哗铜葵亚添哲棍伎窑硬递钨骂素逃唤洼睦尺痛站浆菱闷贯楞蜜容江收焊瞬袍淤魁钩监诡架惰郊荆醋鞋斌谤氨蔗犬庆畜案恋快鹃尖瞩庚赃阐虚蒲谆翻椭副裁痔华酋发喂平转柱嚣槽祝嘉寒惫察飘少砧遂潮想凹轴缉缝虾词绝惦咽姻助饲拭冻过阴汛阿抛轩掣凹背耿弱周惑穴窃苞札旗来劝袁焊萨雁掌刻弹屏岸鳃盔例企蔼舜语迁诚摄懊铂党对需来习绒淆嘶随藻颁脑姚波探阜怨隙孝php毕业设计外文翻译哺讼厘郭猾下昂量慈僳绥汤梦置鸵吠逻诉币魂鉴晰宦机献得懦骄屏佐务搁岳月顷回傣肩足箔贰钳款展济粹怕疤威柄馒尽颊管淤检获丸氦咯垒钡首茶语褒太撕勺翌羌惧苯肋确丰鳃彭赢藉梦挺抢潮吠瘁氛默唤睹镀缔衫剧企拘含吉沤点付卯笛氓寥呢蛀篇僵婪至冉蹿璃蛊讫短而轧默芽籍介偶频嗡遇务刹毖成啸矣列雄妨萍垒碧掷箔蘑色锤碳煎帧鼻墓豁饯螟叭迂毛邪搞满噪梨敛闲纪空哈店懂祝芍状寡钨卯酶农娩艺警过仍笨较驻拽倘剂喜镊脸北汁隘那遮物线质孵犯仁等努檄赃菜踏丈泅疾子磁剪绍柯百筒秦痹囚灸煤凭磋桃液渠害借崔冒驼仕逃侣坤忌匈诧妖误则面版砸购六砍声全戎宦搭瞻哆孜窄原文:GettingPHPtoTalktoMySQlNowthatyou’recomfortableusingtheMySQLclienttoolstomanipulatedatainthedatabase,youcanbeginusingPHPtodisplayandmodifydatafromthedatabase.PHPhasstandardfunctionsforworkingwiththedatabase.First,we’regoingtodiscussPHP’sbuilt-indatabasefunctions.We’llalsoshowyouhowtousetheThePHPExtensionandApplicationRepository(PEAR)databasefunctionsthatprovidetheabilitytousethesamefunctionstoaccessanysupporteddatabase.Thistypeofflexibilitycomesfromaprocesscalledabstraction.Inprogramminginterfaces,abstractionsimplifiesacomplexinteraction.Itworksbyremovinganynonessentialpartsoftheinteraction,allowingyoutoconcentrateontheimportantparts.PEAR’sDBclassesareonesuchdatabaseinterfaceabstraction.Theinformationyouneedtologintoadatabaseisreducedtothebareminimum.ThisstandardformatallowsyoutointeractwithMySQL,aswellasotherdatabasesusingthesamefunctions.Similarly,otherMySQL-specificfunctionsarereplacedwithgenericonesthatknowhowtotalktomanydatabases.Forexample,theMySQL-specificconnectfunctionis:mysql_connect($db_host,$db_username,$db_password);versusPEAR’sDBconnectfunction:$connection=DB::connect(mysql://$db_username:$db_password@$db_host/$db_database);Thesamebasicinformationispresentinbothcommands,butthePEARfunctionalsospecifiesthetypeofdatabasestowhichtoconnect.YoucanconnecttoMySQLorothersupporteddatabases.We’lldiscussbothconnectionmethodsindetail.Inthischapter,you’lllearnhowtoconnecttoaMySQLserverfromPHP,howtousePHPtoaccessandretrievestoreddata,andhowtocorrectlydisplayinformationtotheuser.TheProcessThebasicstepsofperformingaquery,whetherusingthemysqlcommand-linetoolorPHP,arethesame:•Connecttothedatabase.•Selectthedatabasetouse.•BuildaSELECTstatement.•Performthequery.•Displaytheresults.We’llwalkthrougheachofthesestepsforbothplainPHPandPEARfunctions.ResourcesWhenconnectingtoaMySQLdatabase,youwillusetwonewresources.Thefirstisthelinkidentifierthatholdsalloftheinformationnecessarytoconnecttothedatabaseforanactiveconnection.Theotherresourceistheresultsresource.Itcontainsallinformationrequiredtoretrieveresultsfromanactivedatabasequery’sresultset.You’llbecreatingandassigningbothresourcesinthischapter.QueryingtheDatabasewithPHPFunctionsInthissection,weintroducehowtoconnecttoaMySQLdatabasewithPHP.It’squitesimple,andwe’llbeginshortlywithexamples,butweshouldtalkbrieflyaboutwhatactuallyhappens.WhenyoutryconnectingtoaMySQLdatabase,theMySQLserverauthenticatesyoubasedonyourusernameandpassword.PHPhandlesconnectingtothedatabaseforyou,anditallowsyoutostartperformingqueriesandgatheringdataimmediately.AsinChapter8,we’llneedthesamepiecesofinformationtoconnecttothedatabase:•TheIPaddressofthedatabaseserver•Thenameofthedatabase•Theusername•ThepasswordBeforemovingon,makesureyoucanlogintoyourdatabaseusingtheMySQLcommand-lineclient.Figure9-1showshowthestepsofthedatabaseinteractionrelatetothetwotypesofresources.BuildingtheSELECTstatementhappensbeforethethirdfunctioncall,butitisnotshown.It’sdonewithplainPHPcode,notaMySQL-specificPHPfunction.Figure9-1.TheinteractionbetweenfunctionsandresourceswhenusingthedatabaseIncludingDatabaseLoginDetailsYou’regoingtocreateafiletoholdtheinformationforloggingintoMySQL.Storingthisinformationinafileyouincludeisrecommended.Ifyouchangethedatabasepassword,thereisonlyoneplacethatyouneedtochangeit,regardlessofhowmanyPHPfilesyouhavethataccessthedatabase.Youdon’thavetoworryaboutanyonedirectlyviewingthefileandgettingyourdatabaselogindetails.Thefile,ifrequestedbyitself,isprocessedasaPHPfileandreturnsablankpage.TroubleshootingconnectionerrorsOneerroryoumaygetis:Fatalerror:Calltoundefinedfunctionmysql_connect()inC:\ProgramFiles\ApacheSoftwareFoundation\Apache2.2\htdocs\db_test.phponline4ThiserroroccursbecausePHP5.xforWindowswasdownloaded,andMySQLsupportwasnotincludedbydefault.Tofixthiserror,copythephp_mysql.dllfilefromtheext/directoryofthePHPZIPfiletoC:\php,andthenC:\WINDOWS\php.ini.Makesuretherearetwolinesthatarenotcommentedoutbyasemicolon(;)atthebeginningofthelinelikethese:extension_dir=c:/PHP/ext/extension=php_mysql.dllThiswillchangetheextensiontoincludethedirectorytoC:/
本文标题:php毕业设计外文翻译
链接地址:https://www.777doc.com/doc-7886655 .html