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.
LOCVPS在农历新年之后新上架了日本大阪机房软银线路VPS主机,基于KVM架构,配备原生IP,适用全场8折优惠码,最低2GB内存套餐优惠后每月仅76元起。LOCVPS是一家成立于2012年的国人VPS服务商,提供中国香港、韩国、美国、日本、新加坡、德国、荷兰、俄罗斯等地区VPS服务器,基于KVM或XEN架构(推荐选择KVM),线路方面均选择国内直连或优化方案,访问延迟低,适合建站或远程办公使用。...
legionbox怎么样?legionbox是一家来自于澳大利亚的主机销售商,成立时间在2014年,属于比较老牌商家。主要提供VPS和独立服务器产品,数据中心包括美国洛杉矶、瑞士、德国和俄罗斯。其中VPS采用KVM和Xen架构虚拟技术,硬盘分机械硬盘和固态硬盘,系统支持Windows。当前商家有几款大硬盘的独立服务器,可选美国、德国和瑞士机房,有兴趣的可以看一下,付款方式有PAYPAL、BTC等。...
Contabo自4月份在新加坡增设数据中心以后,这才短短的过去不到3个月,现在同时新增了美国纽约和西雅图数据中心。可见Contabo加速了全球布局,目前可选的数据中心包括:德国本土、美国东部(纽约)、美国西部(西雅图)、美国中部(圣路易斯)和亚洲的新加坡数据中心。为了庆祝美国独立日和新增数据中心,自7月4日开始,购买美国地区的VPS、VDS和独立服务器均免设置费。Contabo是德国的老牌服务商,...
headersalreadysent为你推荐
wordpress模板wordpress模板与主题的区别163yeah请问网易的163,126,yeah,VIP,188邮箱各有什么特点?特朗普吐槽iPhone为什么这么多人讨厌苹果呢?iPhone配置不足但是iOS流畅度确实很高很强大,性能领先几乎所有国产文档下载怎样把手机里的文件直接下载或复制到U盘里pintang俏品堂是干什么的?很多论坛都有他们的踪迹。即时通请问有没有人知道即时通是什么?怎样先可以开??drupal教程drupal框架初学,请问开发流程是怎么样的,这个框架是对本体做修改,是不是说最后的成品就是这个d开源网店系统国内有哪些好的java开源电子商城系统headersalreadysentPHP中session_start的意思是什么一键备份一键还原 系统备份
到期域名查询 国内vps 免费com域名申请 naning9韩国官网 68.168.16.150 私有云存储 发包服务器 腾讯云分析 admit的用法 美国堪萨斯 香港新世界中心 万网空间购买 drupal安装 英国伦敦 数据库空间 中国linux 中国域名 群英网络 汤博乐 web服务器 更多