PHPSolutionsDynamicWebDesignMadeEasyThirdEditionDavidPowersPHPSolutions:DynamicWebDesignMadeEasy,ThirdEditionCopyright2014byDavidPowersThisworkissubjecttocopyright.
AllrightsarereservedbythePublisher,whetherthewholeorpartofthematerialisconcerned,specificallytherightsoftranslation,reprinting,reuseofillustrations,recitation,broadcasting,reproductiononmicrofilmsorinanyotherphysicalway,andtransmissionorinformationstorageandretrieval,electronicadaptation,computersoftware,orbysimilarordissimilarmethodologynowknownorhereafterdeveloped.
Exemptedfromthislegalreservationarebriefexcerptsinconnectionwithreviewsorscholarlyanalysisormaterialsuppliedspecificallyforthepurposeofbeingenteredandexecutedonacomputersystem,forexclusiveusebythepurchaserofthework.
DuplicationofthispublicationorpartsthereofispermittedonlyundertheprovisionsoftheCopyrightLawofthePublisher'slocation,initscurrentversion,andpermissionforusemustalwaysbeobtainedfromSpringer.
PermissionsforusemaybeobtainedthroughRightsLinkattheCopyrightClearanceCenter.
ViolationsareliabletoprosecutionundertherespectiveCopyrightLaw.
ISBN-13(pbk):978-1-4842-0636-2ISBN-13(electronic):978-1-4842-0635-5Trademarkednames,logos,andimagesmayappearinthisbook.
Ratherthanuseatrademarksymbolwitheveryoccurrenceofatrademarkedname,logo,orimageweusethenames,logos,andimagesonlyinaneditorialfashionandtothebenefitofthetrademarkowner,withnointentionofinfringementofthetrademark.
Theuseinthispublicationoftradenames,trademarks,servicemarks,andsimilarterms,eveniftheyarenotidentifiedassuch,isnottobetakenasanexpressionofopinionastowhetherornottheyaresubjecttoproprietaryrights.
Whiletheadviceandinformationinthisbookarebelievedtobetrueandaccurateatthedateofpublication,neithertheauthorsnortheeditorsnorthepublishercanacceptanylegalresponsibilityforanyerrorsoromissionsthatmaybemade.
Thepublishermakesnowarranty,expressorimplied,withrespecttothematerialcontainedherein.
ManagingDirector:WelmoedSpahrLeadEditor:BenRenow-ClarkeTechnicalReviewer:PaulMilbourneEditorialBoard:SteveAnglin,MarkBeckner,EwanBuckingham,GaryCornell,LouiseCorrigan,JimDeWolf,JonathanGennick,RobertHutchinson,MichelleLowman,JamesMarkham,MatthewMoodie,JeffOlson,JeffreyPepper,DouglasPundick,BenRenow-Clarke,DominicShakeshaft,GwenanSpearing,MattWade,SteveWeissCoordinatingEditor:ChristineRickettsCopyEditor:AprilRondeauCompositor:SPiGlobalIndexer:SPiGlobalArtist:SPiGlobalCoverDesigner:AnnaIshchenkoDistributedtothebooktradeworldwidebySpringerScience+BusinessMediaNewYork,233SpringStreet,6thFloor,NewYork,NY10013.
Phone1-800-SPRINGER,fax(201)348-4505,e-mailorders-ny@springer-sbm.
com,orvisitwww.
springeronline.
com.
ApressMedia,LLCisaCaliforniaLLCandthesolemember(owner)isSpringerScience+BusinessMediaFinanceInc(SSBMFinanceInc).
SSBMFinanceIncisaDelawarecorporation.
Forinformationontranslations,pleasee-mailrights@apress.
com,orvisitwww.
apress.
com.
ApressandfriendsofEDbooksmaybepurchasedinbulkforacademic,corporate,orpromotionaluse.
eBookversionsandlicensesarealsoavailableformosttitles.
Formoreinformation,referenceourSpecialBulkSales–eBookLicensingwebpageatwww.
apress.
com/bulk-sales.
Anysourcecodeorothersupplementarymaterialreferencedbytheauthorinthistextisavailabletoreadersatwww.
apress.
com.
Fordetailedinformationabouthowtolocateyourbook'ssourcecode,gotowww.
apress.
com/source-code.
iiiContentsataGlanceAbouttheAuthorxvAbouttheTechnicalReviewerxviiAcknowledgmentsxixIntroductionxxiChapter1:WhatIsPHP—AndWhyShouldICare1Chapter2:GettingReadytoWorkwithPHP7Chapter3:HowtoWritePHPScripts19Chapter4:LighteningYourWorkloadwithIncludes63Chapter5:BringingFormstoLife97Chapter6:UploadingFiles133Chapter7:UsingPHPtoManageFiles173Chapter8:GeneratingThumbnailImages207Chapter9:PagesThatRemember:SimpleLoginandMultipageForms235Chapter10:GettingStartedwithaDatabase273Chapter11:ConnectingtoaDatabasewithPHPandSQL299Chapter12:CreatingaDynamicPhotoGallery337Chapter13:ManagingContent357Chapter14:FormattingTextandDates383ContentsataGlanceivChapter15:PullingDatafromMultipleTables417Chapter16:ManagingMultipleDatabaseTables435Chapter17:AuthenticatingUserswithaDatabase465Index479vContentsAbouttheAuthorxvAbouttheTechnicalReviewerxviiAcknowledgmentsxixIntroductionxxiChapter1:WhatIsPHP—AndWhyShouldICare1HowPHPHasGrown1HowPHPMakesPagesDynamic2CreatingPagesThatThinkforThemselves3HowHardIsPHPtoUseandLearn4CanIJustCopyandPastetheCode5HowSafeIsPHP5WhatSoftwareDoINeedtoWritePHP5WhattoLookforWhenChoosingaPHPEditor5So,Let'sGetonwithIt6Chapter2:GettingReadytoWorkwithPHP7CheckingWhetherYourWebsiteSupportsPHP7DecidingWheretoTestYourPages8WhatYouNeedforaLocalTestEnvironment9IndividualProgramsoranAll-in-onePackage9SettingUponWindows10GettingWindowstoDisplayFilenameExtensions10ChoosingaWebServer10InstallinganAll-in-onePackageonWindows10ContentsviSettingUponMacOSX11InstallingMAMP11TestingandconfiguringMAMP11WheretoLocateYourPHPFiles(Windows&Mac)13UsingVirtualHosts14CheckingYourPHPSettings14DisplayingtheServerConfigurationwithphpinfo(14Editingphp.
ini16What'sNext18Chapter3:HowtoWritePHPScripts19PHP:TheBigPicture19TellingtheServertoProcessPHP20EmbeddingPHPinaWebpage20StoringPHPinanExternalFile21UsingVariablestoRepresentChangingValues21EndingCommandsWithaSemicolon24CommentingScripts24UsingArraystoStoreMultipleValues25PHP'sBuilt-inSuperglobalArrays26UnderstandingWhentoUseQuotes27MakingDecisions29MakingComparisons31UsingIndentingandWhitespaceforClarity32UsingLoopsforRepetitiveTasks32UsingFunctionsforPresetTasks32UnderstandingPHPClassesandObjects33DisplayingPHPOutput34UnderstandingPHPErrorMessages36PHP:AQuickReference38UsingPHPinanExistingWebsite38DataTypesinPHP39ContentsviiDoingCalculationswithPHP40Addingtoanexistingstring42AllYouEverWantedtoKnowAboutQuotes—andMore42CreatingArrays46TheTruthAccordingtoPHP50CreatingLoops54ModularizingCodewithFunctions57CreatingNewVariablesDynamically61PHPQuickChecklist62Chapter4:LighteningYourWorkloadwithIncludes63IncludingCodefromExternalFiles64IntroducingthePHPIncludeCommands64WherePHPLooksforIncludeFiles65ChoosingtheRightFilenameExtensionforIncludes68CreatingPageswithChangingContent77PreventingErrorswithIncludeFiles85SuppressingErrorMessagesonaLiveWebsite86ChoosingwheretoLocateyourIncludeFiles91Adjustingyourinclude_path91Whycan'tIUseSite-root-relativeLinkswithPHPIncludes93SecurityConsiderationswithIncludes95ChapterReview95Chapter5:BringingFormstoLife97HowPHPGathersInformationfromaForm97UnderstandingtheDifferenceBetweenPostandget99GettingformDatawithPHPSuperglobals102ProcessingandValidatingUserInput102CreatingaReusableScript102PreservingUserInputwhenaFormisIncomplete108FilteringOutPotentialAttacks110ContentsviiiSendingEmail113UsingAdditionalEmailHeadersSafely114HandlingMultiple-ChoiceFormElements122ChapterReview131Chapter6:UploadingFiles133HowPHPHandlesFileUploads133Checkingwhetheryourserversupportsuploads134Addingafileuploadfieldtoaform135Understandingthe$_FILESarray135Establishinganuploaddirectory138UploadingFiles139Movingthetemporaryfiletotheuploadfolder139CreatingaPHPFileUploadClass143DefiningaPHPclass143Checkinguploaderrors150Changingprotectedproperties154Explicitlychangingadatatype158Neutralizingpotentiallydangerousfiles159Preventingfilesfrombeingoverwritten163UploadingMultipleFiles166Howthe$_FILESarrayhandlesmultiplefiles166UsingtheUploadClass170PointstoWatchwithFileUploads171ChapterReview171Chapter7:UsingPHPtoManageFiles173CheckingthatPHPCanOpenaFile173ConfigurationSettingsthatAffectFileAccess174CreatingaFileStorageFolderforLocalTesting174ContentsixReadingandWritingFiles174ReadingFilesinaSingleOperation175OpeningandClosingFilesforRead/WriteOperations179ExploringtheFileSystem188InspectingaFolderwithScandir(188InspectingtheContentsofaFolderwithFilesystemIterator188RestrictingFileTypeswiththeRegexIterator191AccessingRemoteFiles196ConsumingNewsandOtherRSSFeeds196UsingSimpleXML197CreatingaDownloadLink203PHPSolution7-6:PromptingaUsertoDownloadanImage203ChapterReview205Chapter8:GeneratingThumbnailImages207CheckingYourServer'sCapabilities207ManipulatingImagesDynamically208MakingaSmallerCopyofanImage209ResizinganImageAutomaticallyonUpload226ExtendingaClass226UsingtheThumbnailUploadClass233ChapterReview233Chapter9:PagesThatRemember:SimpleLoginandMultipageForms235WhatSessionsAreandHowTheyWork235CreatingPHPSessions238CreatingandDestroyingSessionVariables238DestroyingaSession239RegeneratingtheSessionID239The"HeadersAlreadySent"Error239ContentsxUsingSessionstoRestrictAccess240PHPSolution9-1:ASimpleSessionExample240UsingFile-basedAuthentication244MakingPasswordsMoreSecure251PHPSolution9-6:CreatingaPassword-strengthChecker252SettingaTimeLimitonSessions264PHPSolution9-9:EndingaSessionafteraPeriodofInactivity265PassingInformationThroughMultipageForms267ChapterReview272Chapter10:GettingStartedwithaDatabase273WhichDatabaseShouldYouChoose273CompatibilityofMariaDBandMySQL274HowaDatabaseStoresInformation274Howprimarykeyswork275Linkingtableswithprimaryandforeignkeys276Breakingdowninformationintosmallchunks277Checkpointsforgooddatabasedesign278UsingaGraphicalInterface278LaunchingphpMyAdmin280SettingUpthephpsolsDatabase280MySQLnamingrules280UsingphpMyAdmintocreateanewdatabase281Creatingdatabase-specificuseraccounts282Creatingadatabasetable285Insertingrecordsintoatable287CreatinganSQLfileforbackupanddatatransfer291ChoosingtheRightDataTypeinMySQL295Storingtext295Storingnumbers295ContentsxiStoringdatesandtimes296Storingpredefinedlists296Storingbinarydata297ChapterReview297Chapter11:ConnectingtoaDatabasewithPHPandSQL299CheckingYourRemoteServerSetup299HowPHPCommunicateswithaDatabase301ConnectingwiththeMySQLImprovedextension302ConnectingwithPDO302PHPSolution11-1:Makingareusabledatabaseconnector303Queryingthedatabaseanddisplayingtheresults306UsingSQLtoInteractwithaDatabase313WritingSQLqueries313RefiningthedataretrievedbyaSELECTquery314UnderstandingtheDangerofSQLInjection318UsingPreparedStatementsforUserInput324EmbeddingvariablesinMySQLipreparedstatements325EmbeddingvariablesinPDOpreparedstatements329ChapterReview335Chapter12:CreatingaDynamicPhotoGallery337WhyNotStoreImagesinaDatabase338PlanningtheGallery338ConvertingtheGalleryElementstoPHP340BuildingtheDynamicElements343PassingInformationThroughaQueryString343CreatingaMulticolumntable347PagingThroughaLongsetofRecords349ChapterReview356ContentsxiiChapter13:ManagingContent357SettingUpaContentManagementSystem357CreatingtheBlogDatabaseTable358CreatingtheBasicInsertandUpdateForm359InsertingNewRecords360LinkingtotheUpdateandDeletePages365UpdatingRecords368DeletingRecords376ReviewingtheFourEssentialSQLCommands378SELECT378INSERT380UPDATE380DELETE381SecurityandErrorMessages381ChapterReview381Chapter14:FormattingTextandDates383DisplayingaTextExtract383ExtractingaFixedNumberofCharacters383EndinganExtractonaCompleteWord385ExtractingtheFirstParagraph385DisplayingParagraphs386ExtractingCompleteSentences387Let'sMakeaDate390HowMySQLHandlesDates390InsertingDatesintoMySQL394WorkingwithDatesinPHP400ChapterReview415ContentsxiiiChapter15:PullingDatafromMultipleTables417UnderstandingTableRelationships417LinkinganImagetoanArticle419AlteringtheStructureofanExistingTable419InsertingaForeignKeyinaTable421SelectingRecordsfromMultipleTables427FindingRecordsthatdon'thaveaMatchingForeignKey432CreatinganIntelligentLink433ChapterReview434Chapter16:ManagingMultipleDatabaseTables435MaintainingReferentialIntegrity435Supportforforeign-keyconstraints436Insertingrecordsintomultipletables439Creatingacross-referencetable441Gettingthefilenameofanuploadedimage442Adaptingtheinsertformtodealwithmultipletables443UpdatingandDeletingRecordsinMultipleTables454Updatingrecordsinacross-referencetable454Preservingreferentialintegrityondeletion457Creatingdeletescriptswithforeign-keyconstraints461Creatingdeletescriptswithoutforeign-keyconstraints462ChapterReview463Chapter17:AuthenticatingUserswithaDatabase465ChoosinganEncryptionMethod465UsingOne-WayEncryption466CreatingaTabletoStoreUsers'Details466RegisteringNewUsersintheDatabase466ContentsxivUsingTwo-WayEncryption473Creatingthetabletostoreusers'details474Registeringnewusers474Userauthenticationwithtwo-wayencryption475Decryptingapassword477UpdatingUserDetails477WhereNext477Index479xvAbouttheAuthorDavidPowersistheauthorofaseriesofhighlysuccessfulbooksandvideotrainingcoursesonwebdevelopment,withaparticularemphasisonPHPandwebstandards,includingIntroducingPHPandPHPCodeClinicinthelynda.
comOnlineTrainingLibrary.
Asaprofessionalwriter,hehasbeeninvolvedinelectronicmediaformorethan40years,firstwithBBCradioandtelevisionandmorerecentlywiththeInternet.
HisclearwritingstyleisvaluednotonlyintheEnglish-speakingworld,asseveralofhisbookshavebeentranslatedintoSpanish,Polish,Chinese,andotherlanguages.
Whatstartedasamildinterestincomputingwastransformedalmostovernightintoapassion,whenDavidwaspostedtoJapanin1987asBBCcorrespondentinTokyo.
WithnocorporateITdepartmentjustdownthehallway,hewasforcedtolearnhowtofixeverythinghimself.
Whennottinkeringwiththeinnardsofhiscomputer,hewasreportingforBBCtelevisionandradioontheriseandcollapseoftheJapanesebubbleeconomy.
SinceleavingtheBBCtoworkindependently,hehasworkedonmanyprojects,includingthedevelopmentofanonlinebilingualdatabaseofeconomicandpoliticalanalysisforJapaneseclientsofaninternationalconsultancy.
HealsoteachesapostgraduateWebMediacourseatOxfordBrookesUniversity.
WhennotpoundingthekeyboardwritingbooksordreamingofnewwaysofusingPHPandotherprogramminglanguages,Davidenjoysnothingbetterthanvisitinghisfavoritesushirestaurant.
HehastranslatedseveralplaysfromJapanese.
xviiAbouttheTechnicalReviewerPaulMilbournehasbeenasoftwaredeveloperintheWashington–Baltimoremetropolitanareaforoverdecade.
HisjourneyhasallowedhimtoworkwithsuchclientsastheWashingtonRedskins,BaltimoreRavens,ZyngaGames,andmanyothers.
Forthemostpart,Paulhasmadeahandsomecareerputtingoutfiresanddealingwithedgecases.
Thisexperiencehasexposedhimtomostaspectsofdevelopmentthroughamultitudeofindustriesandplatforms.
Paulisalsoaformerchef,anavidmusician,andapracticingfineartist.
xixAcknowledgmentsTheoriginalideatowritePHPSolutionscamefromChrisMills,myeditorformanyyearsatApress/friendsofED,who'snowaSeniorTechnicalWriteratMozillaCorporationandapassionateadvocateofwebstandards.
Chriswantedtomoveawayfromthecookbookformulaofisolatedsolutionsthatleftthereaderwithlittleornoideaaboutthepracticaluseofaparticulartechnique.
Thefactthatthisbookisnowinitsthirdeditionproveswhatagreatideaitwas.
Thanks,Chris.
Chris'ssuccessoraseditorofthesecondandthirdeditions,BenRenow-Clarke,followedhisexamplebygivingmefreereintoshapethebookaccordingtomyownideas,butalwaysputtinghimselfinthepositionofthereader,nudgingmeintherightdirectionwhenanexplanationwasn'tclearenoughorachapterwasbadlyorganized.
I'malsogratefultomytechnicalreviewers:SamuelWrightforthefirstedition,KristianBesleyandJasonNadonforthesecondedition,andPaulMilbourneforthisedition.
Eacheditionhasbuiltonthepreviousone,soideasandsuggestionsmadebyreviewersofpreviouseditionsliveoninthisone.
ProducingabooklikethiswouldbeimpossiblewithoutthediligenthelpofeveryoneintheproductionchainatApress.
Mythanksgotothemall.
Mostofall,mythanksgotothereaderswhohavemadethisbooksuchasuccess.
Welcometotheclub.
IhopeyouenjoythisbookandfinditusefulinbuildingdynamicwebsiteswithPHP.
xxiIntroductionWhenthefirsteditionofPHPSolutionswaspublished,Iwasconcernedthatthesubtitle,DynamicWebDesignMadeEasy,soundedoverambitious.
Evenwiththisthirdedition,itstillmakesmealittleapprehensiveaboutundulyraisingreaders'expectations.
PHPisnotdifficult,butnorisitlikeaninstantcakemix:justaddwaterandstir.
Everywebsiteisdifferent,soit'simpossibletograbascript,pasteitintoawebpage,andexpectittowork.
Myaimwastohelpwebdesignerswithlittleornoknowledgeofprogramminggaintheconfidencetodiveintothecodeandadjustittotheirownrequirements.
Thefactthatthebookhasremainedsopopularsinceitwasfirstpublishedin2006suggeststhatmanyreaderstookupthechallenge.
MembersofBostonPHPdidsoinlargenumberswhentheyadoptedthesecondeditionasthetextforthreeseriesofPHPPercolate,avirtualself-studygroupforbeginners.
Hundredssigneduptostudythebookonechapteraweek.
Itworkedforthem,soIhopeitwillworkjustaswellforyou.
What'sNewinthisEditionOneusefulpieceoffeedbackfromPHPPercolateparticipantsandotherreaderswasdisappointmentwhenIglossedoverasectionofadvancedcode,explainingonlywhatitdidratherthanhowitworked.
Thatomissionhasbeencorrectedinthisedition.
Occasionally,Ipointoutthatyoumightwanttoskipthedetailedexplanation,butit'sthereifyou'reintriguedbyhowatechniqueworks.
Asaresult,thereferencesectionofChapter3hasbeenexpandedtoincludesuchesotericdelightsasvariablevariables.
No,it'snotatypo;"variablevariable"isagenuineconceptinPHP.
It'salsoquiteuseful.
ThiseditionbringsthecontentuptodatewithPHP5.
6,whichwasreleasedinAugust2014.
BecausehostingcompaniesareoftenslowtoupgradetheversionofPHPthattheyoffer,I'vemadePHP5.
4theminimumversionforthecodeusedinthisbook.
PHP5.
4madesomeimportantchanges,introducingasimplifiedarraysyntaxanddroppingsupportforsafemodeand"magicquotes.
"Aswellasbringingthecodeuptodate,I'verevisedeverychapter,goingthroughitlinebyline,clarifyingexplanations.
I'vealsoeliminatedanumberoferrors—without,Ihope,introducingnewones.
ThebiggestchangesaretothecustomclassesforuploadingfilesandcreatingimagethumbnailsinChapters6and8.
Theynowusenamespacestoavoidnamingclasheswithotherthird-partycode.
Moreimportant,theclassdefinitionshavebeenextensivelyrewrittentomakethemmoreefficient.
AnothersignificantchangeistheuseofthenewpasswordhashingfunctionsinChapters9and17.
Thesefunctionsweren'tintroduceduntilPHP5.
5,butyoucanemulatetheminPHP5.
4byincludingthepassword_compatlibraryinyourscripts.
Detailsofhowtoobtainthelibrary,whichconsistsofasinglefile,canbefoundinChapter9.
Thechaptersonworkingwithadatabasehavebeenreorganizedtomakethemeasiertofollow.
I'vealsostrengthenedtheexplanationofpreparedstatements,usingbothMySQLImproved(MySQLi)andthedatabase-neutralPHPDataObjects(PDO).
SomeLinuxdistributionsnowinstallMariaDBasadrop-inreplacementforMySQL.
Toavoidunnecessaryrepetition,InormallyreferonlytoMySQL,butallthePHPsolutionsinthisbookworkequallywellwithMariaDB.
IntroductionxxiiHowThisBookIsOrganizedEachchaptertakesyouthroughaseriesofstagesinasingleproject,witheachstagebuildingonthepreviousone.
Byworkingthrougheachchapter,yougetthefullpictureofhoweverythingfitstogether.
Youcanlaterrefertotheindividualstagestorefreshyourmemoryaboutaparticulartechnique.
Althoughthisisn'tareferencebook,Chapter3isaprimeronPHPsyntax,andsomechapterscontainshortreferencesections—notablyChapter7(readingfromandwritingtofiles),Chapter9(sessions),Chapter10(datatypesinMySQL/MariaDB),Chapter11(PHPpreparedstatements),Chapter13(thefouressentialSQLcommands),andChapter14(workingwithdatesandtimes).
So,howeasyiseasyIhavedonemybesttoeaseyourpath,butthereisnomagicpotion.
Itrequiressomeeffortonyourpart.
Don'tattempttodoeverythingatonce.
Adddynamicfeaturestoyoursiteafewatatime.
Gettounderstandhowtheywork,andyoureffortswillbeamplyrewarded.
AddingPHPandMySQL/MariaDBtoyourskillswillenableyoutobuildwebsitesthatoffermuchrichercontentandaninteractiveuserexperience.
UsingtheExampleFilesAllthefilesnecessaryforworkingthroughthisbookcanbedownloadedfromtheApresswebsiteatwww.
apress.
com/9781484206362.
MakesureyouselectthedownloadlinkforPHPSolutions:DynamicWebDesignMadeEasy,ThirdEdition.
Thecodeisdifferentfromthefirsttwoeditions.
SetupaPHPdevelopmentenvironment,asdescribedinChapter2.
Unzipthefilesandcopythephpsolsfolderandallitscontentsintoyourwebserver'sdocumentroot.
Thecodeforeachchapterisinafoldernamedafterthechapter:ch01,ch02,andsoon.
FollowtheinstructionsineachPHPsolution,andcopytherelevantfilestothesiterootortheworkfolderindicated.
Whereapageundergoesseveralchangesduringachapter,Ihavenumberedthedifferentversionslikethis:index_01.
php,index_02.
php,andsoon.
Whencopyingafilethathasanumber,removetheunderscoreandnumberfromthefilename,soindex_01.
phpbecomesindex.
php.
IfyouareusingaprogramlikeDreamweaverthatpromptsyoutoupdatelinkswhenmovingfilesfromonefoldertoanother,donotupdatethem.
Thelinksinthefilesaredesignedtopickuptherightimagesandstylesheetswhenlocatedinthetargetfolder.
Ihavedonethissoyoucanuseafilecomparisonutilitytocheckyourfilesagainstmine.
Ifyoudon'thaveafilecomparisonutility,Istronglyurgeyoutoinstallone.
Itwillsaveyouhoursofheadscratchingwhentryingtospotthedifferencebetweenyourversionandmine.
Amissingsemicolonormistypedvariablecanbehardtospotindozensoflinesofcode.
WindowsuserscandownloadWinMergeforfreefromhttp://winmerge.
org/.
IuseBeyondCompare(www.
scootersoftware.
com),whichisnowavailableforWindows,MacOSX,andLinux.
It'snotfreebutisexcellentandreasonablypriced.
BBEditonaMacincludesafilecomparisonutility.
Alternatively,usethefilecomparisonfeatureinTextWrangler,whichcanbedownloadedfreefromwww.
barebones.
com/products/textwrangler/.
LayoutConventionsTokeepthisbookasclearandeasytofollowaspossible,thefollowingtextconventionsareusedthroughout:Importantwordsorconceptsarenormallyhighlightedonthefirstappearanceinboldtype.
Codeispresentedinfixed-widthfont.
Neworchangedcodeisnormallypresentedinboldfixed-widthfont.
Pseudo-codeandvariableinputarewritteninitalicfixed-widthfont.
MenucommandsarewrittenintheformMenuSubmenuSubmenu.
WhereIwanttodrawyourattentiontosomething,I'vehighlightedit,likethis:Ahem,don'tsayIdidn'twarnyou.
DogYun(中文名称狗云)新上了一批韩国自动化上架独立服务器,使用月减200元优惠码后仅需每月300元,双E5 CPU,SSD+NVMe高性能硬盘,支持安装Linux或者Windows操作系统,下单自动化上架。这是一家成立于2019年的国人主机商,提供VPS和独立服务器租用等产品,数据中心包括中国香港、美国洛杉矶、日本、韩国、德国、荷兰等。下面分享这款自动化上架韩国独立服务器的配置和优惠码信息。...
御云怎么样?炎炎暑期即将来临,御云(royalyun)香港、美国服务器开启大特惠模式。御云是新成立的云服务提供商,主要提供香港、美国的云服务器,不久将开启虚拟主机业务。我们的香港和美国主机采用CN2 GIA线路。目前,香港cn2 gia vps仅7.9元每月起,美国vps仅8.9/月,续费同价,可叠加优惠,香港云服务器国内延迟一般在50ms左右,是搭建网站的最佳选择,但是请不要用于违法用途。点击进...
酷番云怎么样?酷番云就不讲太多了,介绍过很多次,老牌商家完事,最近有不少小伙伴,一直问我台湾VPS,比较难找好的商家,台湾VPS本来就比较少,也介绍了不少商家,线路都不是很好,有些需求支持Windows是比较少的,这里我们就给大家测评下 酷番云的台湾VPS,支持多个版本Linux和Windows操作系统,提供了CN2线路,并且还是原生IP,更惊喜的是提供的是无限流量。有需求的可以试试。可以看到回程...
headersalreadysent为你推荐
Keyiosuctools为什么一直服务器暂不可用aspweb服务器asp网站挂上服务器,详细步骤linux防火墙设置怎么更改linux的防火墙设置?德国iphone禁售令德国IPHONE多少钱?急~Flash动画设计与制作——第九章:导出和发布动画163yeah网易yeah邮箱登陆internetexplorer无法打开为什么Internet Explorer浏览器无法打开宜人贷官网宜信信用贷款上征信吗电子商务世界电子商务都有什么内容
已备案域名注册 美国linux主机 2019年感恩节 全球付 php主机 payoneer 免费网站监控 智能骨干网 福建天翼加速 建立邮箱 合租空间 vip购优惠 购买国外空间 架设邮件服务器 starry 上海电信测速 免费个人网页 网站加速 攻击服务器 阿里云邮箱申请 更多