todayphpecho
phpecho 时间:2021-05-20 阅读:(
)
485ChristosKarayiannis2019C.
Karayiannis,Web-BasedProjectsthatRocktheClass,https://doi.
org/10.
1007/978-1-4842-4463-0APPENDIXExchangingVariablesBetweenJavaScriptandPHPInthisbook,theJavaScriptlanguageisusedfortheclientsideoftheHTTPclient-servermodel,andPHPisusedfortheserverside.
Insomecases,thetwolanguagesneedtoexchangevariables,andthereareanumberofwaystodothat.
TheexamplesinthisappendixdisplaythemainwaystoexchangevariablevaluesbetweenJavaScriptandPHP.
Example1:PassingVariablesfromPHPtoJavaScriptUsingtheechoCommandToallowPHPtosetJavaScriptvariables,youcansimplyinjectPHPechocommandsintothescriptinthePHPfile.
ThesecommandsarethenevaluatedontheserversideandcreatetheJavaScriptcodethatisexecutedlocallyatthebrowser.
TheJavaScriptcodethatappearswithinthePHPcodehastobeincludedinanechomessage;otherwise,itisomittedwhenthePHPcodeisevaluated.
Inthefollowingcode,whichshowsthetest1.
phpPHPfile,thePHPvariable$pholdsthecurrentIPaddressoftheclient,anditisassignedtotheJavaScriptvariablej.
Thevalueofvariablejisthenprintedonthewebpage.
486varj="';echo$p;echo'";document.
write(j);';>ThepreviousPHPcodeevaluates,fortheIPaddress94.
69.
186.
8,tothefollowingcode:varj="94.
69.
186.
8";document.
write(j);Example2:PassingVariablesfromJavaScripttoPHPUsingthelocationObjectPHPworksontheserverside,inotherwords,atthewebserver.
Therefore,forJavaScripttoassignvaluestoPHPvariables,thevaluesmustbesubmittedtothewebserver.
ThefollowingHTMLfile,calledindex.
html,includestheJavaScriptsourcecode.
Thewindow.
locationobject(orsimplylocation)isusedtogetinformationabouttheURLofthecurrentwebpage(document);italsoredirectsthebrowsertoanotherwebpage.
Inthisexample,thelocation.
hrefpropertysetstheURLthatthecurrentpageredirectsto.
Thenewpageistest2.
php,andthep1andp2valuesareincludedinthequerystring.
varj1="hello";varj2="world";location.
href="test2.
phpp1="+j1+"&p2="+j2;AppendixExchangingVariablesBetweenJavaScriptandPHP487Thesourcecodeoftest2.
phpisasfollows:TherequestissuedbyJavaScriptpassesthevaluesofp1andp2,whichcanberetrievedbyPHPas$_GET["p1"]and$_GET["p2"],respectively.
TheechomessageprintedtothewebpagewhenPHPresolvesishelloworld.
Example3:PassingVariablesfromJavaScripttoPHPwithHTMLFormSubmissionInthepreviousexample,theHTTPmethodGETisonlyforsubmittingJavaScriptdatatoPHP.
WithHTMLforms,youcanutilizeeitherGETorPOST.
Considerthefollowingexampleofindex.
php,whereJavaScriptfillsthevalueofahiddenelementandsubmitsitwiththeform.
varj1="helloworld";document.
getElementById('p1').
value=j1;document.
getElementById("f1").
submit();AppendixExchangingVariablesBetweenJavaScriptandPHP488TheformissubmittedfromtheJavaScriptsourcecodewiththesubmit()methodoftheformobject.
document.
getElementById("f1").
submit();Thesourcecodeoftest3.
php,theprogramthatreceivestheformdata,isasfollows:ThevalueoftheJavaScriptvariablej1issubmittedusingtheformandisassignedthenfromthePHPsourcecodetothePHPvariable$p2.
Thevalueof$p2isprintedtotheuser'swebpagewiththeechocommand.
Example4:PassingVariablesfromJavaScripttoPHPandBackwithAjaxAnotherwaytopassvariablesfromJavaScripttoPHPistousetheAjaxmechanism.
Ajaxisnotaprogramminglanguage;rather,itisatechniquethatinvolvestheJavaScriptXMLHttpRequestobject,whichcreatesanasynchronousconnectiontothewebserverinthebackground.
Asynchronousmeansthatthescriptsendsarequesttothewebserverandcontinuesitsexecutionwithoutwaitingforareply.
Fortheasynchronousrequest,acallbackfunctionissetthathandlesthereturneddatafromtheserverwhenitarrives.
InitiallyAjaxwasimplementedwiththeXMLlanguage,whichhandledalltherequeststotheserver.
AnotherwaytousetheAjaxmethodiswiththeDOMmodel.
JavaScriptusestheDOMtoprovidepositionstothewebpageforwheretoplacetheserver'sreply,suchasataparagraphwithaspecificID.
Thesepositionsaretheonlypartsofthewebpagethatareupdated,insteadofreloadingthewholepage.
DOMobjectsprovidethepositionsofthedatathatwillbesubmittedtothewebserver.
CSSalsoplaysanimportantpartintheAjaxmethodbecausethereturneddatacanbeformattedwithCSStoretainthestylingofthewebpagethatsubmitstheAjaxrequest.
AppendixExchangingVariablesBetweenJavaScriptandPHP489XMLHttpRequest()istheconstructormethodthatisusedtocreateXMLHttpRequestinstances(thatis,objects)fortheXMLHttpRequestclass.
Theobjectsareusedtoconnecttoawebserver,dispatchinganHTTPrequestandreceivingthereply.
TheXMLHttpRequestclassdefinesmethods(routines)andproperties(variables)fortherequesthandling.
ThefollowingaretheXMLHttpRequestclassmethods:XMLHttpRequest()istheconstructoroftheXMLHttpRequestobject.
abort()cancelsthecurrentrequest.
getAllResponseHeaders()returnstheheadersoftheresponsemessage.
getResponseHeader()returnsaspecificresponseheader.
open()initializestherequestbysettingitsattributes.
send()sendstherequesttothewebserver.
setRequestHeader()setstheheadersoftherequest.
ThefollowingaretheXMLHttpRequestclassproperties:onreadystatechangedefinesthefunctionthatwillbecalledwhenthereadyStatepropertychanges.
readyStatetakesanintegervaluethatcorrespondstothestatusoftheXMLHttpRequest,specifically:0:Requestnotinitialized1:Serverconnectionestablished2:Requestreceived3:Processingrequest4:RequestfinishedandresponsereadyresponseTextholdstheresponsedataasastring.
responseXMLholdstheresponsedataasXMLdata.
statusholdsthestatusoftherequestreplyasanHTTPstatuscode.
ExamplesofHTTPstatuscodesarethefollowing:200,301,400,403,404,and501statusTextholdsthecorrespondingtextoftheHTTPstatuscode.
Herearesomeexamples:AppendixExchangingVariablesBetweenJavaScriptandPHP490OKforstatuscode200MovedPermanentlyforstatuscode301BadRequestforstatuscode400Forbidden403NotFoundforstatuscode404NotImplementedforstatuscode501Thefollowingfile,test4.
html,usesthePOSTmethodtosubmitdatatotheprogramtest4.
phpwiththeAjaxmechanism.
TheJavaScriptfunctionsendRequest()runswhenthewebpageisloaded.
window.
onload=sendRequest;Inthisexample,theJavaScriptvariablej1issentviaAjaxasvalue1tothePHPsourcecodeandisreceivedintheglobalvariable$_POST["value1"].
Thisisechoedtothewebpagereturnedtothebrowser,andthemessagehelloworld,theinitialvalueofj1,isprintedtothepredefinedparagraphelement,p1.
functionsendRequest(){varxhr=newXMLHttpRequest();xhr.
onreadystatechange=function(){if(xhr.
readyState==4&&xhr.
status==200){document.
getElementById("p1").
innerHTML=xhr.
responseText;}}xhr.
open("POST","test4.
php",true);xhr.
setRequestHeader("Content-type","application/x-www-form-urlencoded");varj1="helloworld";xhr.
send(`value1=${j1}`);}window.
onload=sendRequest;AppendixExchangingVariablesBetweenJavaScriptandPHP491Thesourcecodefortest4.
phpisasfollows:TheequivalentversionfortheHTTPmethodGETwouldbeasfollows:functionsendRequest(){varxhr=newXMLHttpRequest();xhr.
onreadystatechange=function(){if(xhr.
readyState==4&&xhr.
status==200){document.
getElementById("p1").
innerHTML=xhr.
responseText;}}varj1="helloworld";xhr.
open("GET",`test4b.
phpvalue1=${j1}`,true);xhr.
send();}window.
onload=sendRequest;AppendixExchangingVariablesBetweenJavaScriptandPHP492Thesourcecodefortheactionfile,test4b.
php,isasfollows:Example5:PassingVariablesfromJavaScripttoPHPwithCookiesAnotheroptionforexchangingvariablesbetweenJavaScriptandPHPisthroughcookies.
CookiescanbesetandretrievedfromJavaScriptandalsofromPHP.
Inaddition,acookiesetwithJavaScriptcanberetrievedbyPHPandviceversa.
Thefollowingsourcecode,usedinaPHPfilesuchastest5.
php,usesJavaScripttosetthevalueofthecookiemessageintheheadsectionoftheHTMLsourcecode.
TheninthebodysectionoftheHTMLsourcecode,thePHPcoderetrievesthecookie'svalueandprintsthismessage:Cookie'message'hasvaluehello.
functionsetCookie(name,value,expires,path,domain,secure){cookieString=name+"="+encodeURIComponent(value)if(expires){expires=setExpiration(expires);cookieString+="expires="+expires+";";}if(path){cookieString+="path="+path+";";}if(domain){cookieString+="domain="+domain+";";}AppendixExchangingVariablesBetweenJavaScriptandPHP493if(secure){cookieString+="secure;";}document.
cookie=cookieString;}functionsetExpiration(days){vartoday=newDate();varexpires=newDate(today.
getTime()+days*24*60*60*1000);returnexpires.
toUTCString();}window.
onload=setCookie("message","hello",1);IntheJavaScriptsourcecode,thecookiestringisformedwiththerequiredinformationfromtheseproperties:name,value,expires,path,domain,andsecure.
ThefunctionencodeURIComponent()isusedtoencodethefollowingspecialcharacterswiththeirUTFencodedversions:AppendixExchangingVariablesBetweenJavaScriptandPHP494Fortheexpirationdate,thecurrentdateiscalculatedinmillisecondsviatoday.
getTime(),andthedaysthecookieisvalid,alsoinmilliseconds,iscalculatedandaddedtothecurrentdatetoformtheUnixtimestamp.
ThetoUTCString()methodconvertsthisdatetoastringaccordingtoCoordinatedUniversalTime(UTC)standard.
Here'sanexample:Mon,29Oct201806:35:38GMTThecookieissetwhenthewebpageisloadedwiththefollowingJavaScriptcommand:window.
onload=setCookie("message","hello",1);ThePHPcoderetrievesthecookieintheglobalvariable$_COOKIE[$c_name],where$c_nameisthemessageinthecurrentexample.
Example6:PassingVariablesfromPHPtoJavaScriptwithCookiesThefollowingPHPcodecreatesacookienamedmessage,assignsthevaluehellotoit,andspecifiesthatthecookieexpiresinonehour(60minutes*60seconds)fromnow.
Thefunctiontime()returnsanintegercontainingthecurrenttimeasaUnixtimestamp.
Inthefollowingexample,whichisincludedinaPHPfilecalledtest6.
php,thePHPcodesetsthevalueofthecookienamedmessagetohello,andthenJavaScriptretrievesthisvalueandprintsitonthewebpage:AppendixExchangingVariablesBetweenJavaScriptandPHP495functionretrieve_cookie(w){varc_value="";vardUC=decodeURIComponent(document.
cookie);cArray=newArray();cArray=dUC.
split(';');for(i=0;iThefunctionretrieve_cookie()returnsthevalueforthecookienamepassedasaparameter.
Thisfunctionsplitsdocument.
cookie,astringcontainingasemicolon-separatedlistofallcookiesofthesite,andcreatesanarraywhereeachelementincludesAppendixExchangingVariablesBetweenJavaScriptandPHP496informationforasinglesitecookie.
Consider,forinstance,thecasewheretwocookiesweresetwiththefollowingPHPcode:Thedocument.
cookiestringinthiscasewouldbeasfollows:message=hello;message2=hello2Toprintthevalueofdocument.
cookie,usethefollowingcommandinretrieve_cookie():document.
write(document.
cookie);Inaforloopinretrieve_cookie(),eachname-valuepairissplitacrossanequalsign,andanewarrayiscreatedwiththefirstelementasthenameandthesecondelementasthevalue.
Ifthegivennamethatwaspassedasaparametertothefunctionmatchesthefirstelement,thesecondelement(thevalue)isreturned.
NoticethatencodeURIComponent()isusedtoensurethatdocument.
cookiedoesnotcontainanycommas,semicolons,orwhitespace.
AppendixExchangingVariablesBetweenJavaScriptandPHP497ChristosKarayiannis2019C.
Karayiannis,Web-BasedProjectsthatRocktheClass,https://doi.
org/10.
1007/978-1-4842-4463-0IndexA,Ba2enmod(apache2enablemodule)command,102Ajax,474,488alert()method,52,473altertablestatement,230AmazonStandardIdentificationNumber(ASIN),241AnimatedPNGimageezgif.
comwebpagecolortransparency,213display,212effectstool,212process,213frames,209getElementById(),216pattern,2090.
pngfile,209runs,216sixPNGfiles,209sourcecode,214–215sub()runs,216uploadedimages,211webpage,211zippedfile,210Apacheconfiguration,139–141,336–338apache_note()function,103ApacheVhosts,94–96Apachewebserveradministrativefeatures,1Apacheprocess,16–18apache2process,2CAcertificate,392commandpsoutputlists,2directoryindex,Ubuntu,3downloadandinstall,2ifconfigcommand,7,8LAN,7–9Linuxfirewall,14,16logging,36newdirectoriesandwebpages,4–7PHPengine,37staticprivateIPaddress,9–14testing,IPaddress,8vhosts(seeVirtualhosts(vhosts))appDataLayerstruct,251,252Applicationprogramminginterface(API),449Asymmetriccryptography,328ATCPportchecksitehomepage,460index.
php,sourcecode,460–462systemports,462warningmessage,462onlineopenportchecktool,459onlineporttestsite,467homepage,468portverification,470remotebrowser,469498port443testing,465port.
php,sourcecode,463–464port25testing,466–467auto_incrementkeyword,226awktool,257Ccatcommand,257ceil()function,316Certificateauthorities(CAs),328Certificate-signingrequest(CSR),329,388chmod(changemode)command,256Client-servercommunication,330Client-sidevs.
server-sideprogramsJavaScript/PHPadditionwebpageactionattribute,65addition2.
html,69–71addition.
php,66addition2.
php,72,74HTMLfile,62–64JavaScriptcalculator,66Number()function,64onclickevent,64program.
html,62program2.
html,67–69,74result,66$cntvariable,291Command-LinePHPclient,453–454Command-LinePHPsocketservercode,450–452CommonGatewayInterface(CGI),39$connectionvariable,464Cookies,353–354,492create_entry()arguments,419CREATETABLESQLcommand,421cron,databaseupdateBashscript,283crontab,280–281gedit,283HTMLfiles,284MySQLserver,282webpages,284–285crontabcommand,280Cross-sitescripting(XSS),81DDatabase,search-enabledsiteBashshellscript,275chmodcommand,278do…donecommands,277infodatabase,279MySQLserver,277–279creationinfodatabase,273MySQLclient,275MySQLserver,274Datalayer,252ddclientdaemon,448deleteSQLstatement,230describeSQLstatement,226DocumentRootdirective,397DomainnameIPaddress,ddclientApache/Lighttpd,443currentIPaddress,445ddclientinstallation,446DDNSprovider'ssite,447–448Linuxterminal,444newpublicIPaddress,449DomainnameregistrationCASSLcertificate,387CSR,388directory,389OpenSSL,389ATCPportchecksite(cont.
)499newlyregistereddomainname,387searchavailability,386TLD,386DomainNameSystem(DNS)service,125droptablestatement,226Dynamiccontentwebsitepagination(seePagination)projectdesign,271search-enabledsite,269–271submitbuttons,318,320testingdirectoryindex,294echo$itemscommand,298explode()function,300$itemsvalue,299multiplekeywords,296–297preg_split()function,exclude,301query,295–296,299trim()function,exclude,300webcontentsamples,272–273DynamicDNS(DDNS)serviceaccountcreation,130no-IP,register,126routerconfiguration,131–132updation,125DynamicHostConfigurationProtocol(DHCP),9,10DynamicIPaddressservice,445Eechocommand,52,61,73,115,265,454e-mailaccountconfirmation,128equijoin,435FFavoriteicon(favicon),156–163fgets()function,152FileTransferProtocol(FTP),473Formvalidationerrormessages,79formtesting,80JavaScript,testing146–147PHPsourcecode,80validate.
phpfile,creation,75warningsdisplay,80webpagecreation,79Fullyqualifieddomainname(FQDN),126ports.
httpsserver.
eu,483qotd.
httpsserver.
eu,484QOTDserver,482vhostscreation,482fwrite()function,86GGeoIPApachemodulea2enmodcommand,102apache2ctl–Mcommand,101apache_note()function,103GeoIP.
dat.
gz,103geo2.
php,103geoip_module,101–102mods-available,102testlocation,105–106webpagetest.
org,104–105GeoIPCity,113GeoIP.
dat.
gz,103geoip_module,101–102getElementById()function,216GETmethod,54GETmethod,siteimplementationamazon.
co.
uksite,324–325offsetvalue,323–324POSTreferences,321Index500querystring,322–323test,321grepcommand,257Hheader()function,82,437Homepage,dynamiccontentwebsitedirectoryindex,286–288HTMLfiles,285PHPechocommand,293–294likeoperator,291MySQLserver,292–293search.
php,288–290PHP-MySQLinterface,286Hostnames,133,135htmlspecialchars()function,81HTTPalternateport,89HTTPcookiesbrowsertools,365–366displaydetails,361e-commercesite,352Lighttpdconfigurationfile,362–363Linux,363andPHPsessions(seePHPsessions)remove,PHP,355retrieve,PHP,355settings,353–354sitecreation,PHP,355–357,359–360webserverprograms,353Wiresharkpacketanalyzer,361,364Iinfo.
phpwebpage,42INSERTINTOcommand,263–264insertintoSQLstatement,228InternationalStandardBookNumber(ISBN),243Internetprotocol,343intval()function,464IP-basedvirtualhostsaddressbar,24a2ensite(apache2enablesite)command,22configurationrules,21DirectoryIndexdirective,21directoryindexes,22index1.
html,21,24index2.
html,23Linuxterminal,22testing,24–25start/endVirtualHostcontainers,21isset()function,73,82J,KJavaScripttoPHPAjax,488–491cookies,492–493HTTPmethod,487–488locationobject,486–487LLighttpdanimatedPNGimage(seeAnimatedPNGimage)basicconfiguration,170–171change,documentroot,173configuration,334–336createdonlineservices(seeOnlineserviceswithLighttpd)GETmethod,siteimplementation(cont.
)501enablinganddisablingthedirectory,174–175errormessage,176,178GUI,165installation,165–166logfilesaccess,178–180multipleclientrequests,203–208object-orientedprogrammingprinciples,170PHP7.
0,189phpinfo()function,189server.
modulesdirective,170specificIPaddress/hostname,171–172testingbasicconfiguration,166–167directoryindex,167–168documentroot,166HTMLsourcecode,167index.
lighttpd.
html,166virtualhosts,181–189Lighttpdwebserver,CAcertificate,399Linuxfirewall,14,16Localareanetwork(LAN)FQDN,350HTTPSconnectiontesting,347–349,352port443,346,350–351portlocating,346routerwebinterface,connection,345Mmatchstring()method,145methodattribute,462mods-available,102mysql-clientpackage,219MySQLdatabasealtertablestatement,230describeSQLstatement,232–233download,219helpcommand,221,222insertSQLstatement,231installation,219–220mysqlclient,221MySQLserver,223–224selectstatement,232status,220tableconnection,233–235CREATETABLEcommand,227describeSQLstatement,226–227droptablestatement,226foreignkey,226primarykey,226mysqli()function,292mysqli_fetch_assoc()function,293mysqli_free_result()function,294mysqli_query()function,293,419mysqliPHPcommand,288MySQL-PHPinterface,269mysql-serverpackage,219NName-basedvhostscreate,31000-default.
conf,30/etc/hostsfile,30HTMLcode,32index.
html,32Linuxterminal,32localhost,30reload,webserver,33ServerNamedirective,30Index502testingfirstname-based,34secondname-based,34webpagedownloaded,30NetworkAddressTranslation(NAT)protocol,89–90nl2br()function,84no-IPaccountactivation,129ConfirmAccountbutton,129e-mailaccountconfirmation,128homepage,127hostname,128Normalizing,435Oonclickevent,64OnlineserviceswithLighttpdactionfilecreationdirectoryscreenshot,201exec()PHPfunction,202PHPcode,198php.
pngimage,203savefile,197screenshot.
php,197shell_exec(),202wkhtmltoimage,199–200Xvfbserver,201basicwebpages,190createdirectoryindex,195–196homepage,191index.
php,191invalidURL,194screenshot.
php,193URLinserts,191webserverresponses,193Onlinewebservicesitecreation,138–139WHIOStesting,154–155open()method,478Openportchecktool,471–473opensslreqcommand,388PPaginationforwardorbackward,308HTMLform,307index.
phpversion,310–311limitclause,305limitMySQL,304–305PHPengine,306search.
php,307,311–315$count,315echocommand,316–317$offset,315PCRERegularExpression(PREG),291PHPCLIresults,45echocommand,51engine,39epigrammaticuses,40formvalidation(seeFormvalidation)installation,41–42interpreters,43testing,41–45user-definedvariables,57variablessettingGETmethod,54POSTmethod,58webpagesourcecode,46PHPCommand-Linesocketserver,452–453PHPdataobjects(PDO),288Name-basedvhosts(cont.
)503PHP-enabledwebserver,39phpinfo()function,380PHPSESSIDcookie,383PHPsessionscookiemodification,366CSSsection,371directoryindex,368index.
php,371–376page1.
html,376–380page2.
html,378–380PHPSESSIDcookie,367projectexperimentation,380–383sessionID,367webpage,369,371PHPsockets,449–450command-lineserver,455–456,458webserver,configuration,454–455PHPtoJavaScriptcookies,494–495echocommand,485–486ping.
euWHOISservice,138Port-basedvirtualhostsa2ensitecommand,26configurationrules,27create,26directoryindexes,27documentrootdirectory,28HTMLsourcecode,27Linuxcommandline,27listeningports,26testing,29PortforwardingApachevhosts,94,96configurationwebpage,92formdetails,92LevelOneFBR-1161ADSLrouter,webpage,93routers,90settings,93web-basedconfigurationinterface,testrouter,91Portnumber,94POSTmethod,58,321,357,359preg_split()function,291PrivacyEnhancedMail(PEM),333PrivateIPaddress,94Publicandprivateaddresses,89PublicIPaddress,96Publickeyinfrastructure(PKI),327,328QQueryresults,two-coloredtable,302–303Quoteoftheday(QOTD)protocol,450onlineservicecreation,473ajaxtechnique,474QOTDservers,474project,sourcecode,475–476sitetesting,479sourcecodecygnus-x.
net,477djxmmx.
net,477onlineservicehomepage,477qotd.
php,478TCPsocket,479RRainbowtable,424Regularexpressions,145–146Requestsforcomments(RFCs),269Rootcertificates,328routecommand,10Routerconfigurationoptions,91Index504SSearch-enabledsitehomepage,270RFCeditor,270rfc-editor.
orgsite,269search.
php,288Second-leveldomain(SLD),385Securelogging,projectdatabasecreation,419,421design,408–409homepage,409loginwebpage,425PHPtoMySQLconnection,testing,421profile.
phpwebpage,439useraccount,webpage,411userconnection,testing,437,439userlogout,436–437userprofilepage,432SecureSocketsLayer(SSL),328CAcertificate,testingcertificateviewer,chromium,404chainoftrust,406homewebpage,402–403onlinetool,405secureconnection,404configuration,LighttpdApache,336–338Lighttpd,334–336selectSQLstatement,229–230Self-signedcertificatesopenSSLhomedirectory,330–333HTTPSprotocol,334testingchromiumbrowserwarning,338–339directoryindex,340,343HTTPSprotocol,343–344insecureconnection,341IPaddress,344localhostlink,339–340securityexception,342untrustedsite,341–342sendRequest()function,477Server-sideprogrammingwithPHPechocommand,52GETmethod,54POSTmethod,58variablesandstringsescapingdouble/singlequotes,49evaluatedtest.
phpwebpage,47HTMLtags,50JavaScriptsourcecode,51mixingPHPandHTMLtags,53$namevariable,52–53.
phpfileextension,46test.
phpfile,46,48userpreferences,53session_start()function,367,380session_uservariable,406,436setcookie()function,354shell_exec()function,44Shellscript,245showdatabasesstatement,224showtablesstatement,253socket_bind(),452socket_close(),452socket_listen(),452SpeedportEntry2iVDSLrouter,91Spywareprograms,353SQLqueriesgroupbyclause,237innerjoinclause,236likeoperator,239–240selectstatement,236updatecommand,238sqlstring,263505SSLEnginedirective,397sslmodule,337,397SSL/TLScertificates,328–329publickeycryptography,328TCP/IPprotocol,328StaticIPaddressservice,445StaticMapMakertool,116StaticmapwebpageeyedroppertoolofmtPaint,124geo6.
php,120–122newversion,121shutterwindow,123StaticprivateIPaddressAddbutton,13DHCP,9DNSserver,13EditingWiredconnection1window,12ifconfig,10IPv4andIPv6settings,11LAN,11,13manualmethod,IPv4settings,13NetworkConnectionswindow,11options,10routecommandreturns,10Savebutton,14testing,14StreamEditor(sed),257,259Stringdelimiters,50strpos()function,153strtotime()function,440strtoupper()function,452StructuredQueryLanguage(SQL),219Submitbuttons,imagesCSSproperties,318CSSdisabledselector,320opacityproperty,320search.
php,318–319submitproperty,319TTCP/IPsockets,449Telnetprotocol,91Top-leveldomains(TLDs),126,386toUTCString()method,494TransportLayerSecurity(TLS)protocol,328Transportprotocol,94trim()function,152UUnixpipeoperator(|),258,277userdata,fileedition,149,151–153URLmaskoption,137Vvalidate()function,144Virtualhosts(vhosts)categories,19download,directoryindex,21enabledsitesanddetails,35IP-based,21–22,24Lighttpdcreatedirectoryindex,184Dashboardwebpage,181DDNSconfiguration,181directoryindex,187–188documentrootdirectory,184Hostheadervalue,186Hostnameswebpage,183HTMLsourcecodeandsavefile,184–186multilineoptions,lighttpd.
conf,188loadedwebpage,183Index506reload,189secureserver,182settings,182URL,187lscommandlists,35name-basedvhosts(seeName-basedvhosts)port-basedvhosts,25–29VirtualHostpair,20Virtualhost,testingpublicIPaddress,router,96–98resultwebpage,100router'sportforwardingservice,96webpagetest.
orghomepage,98–99Visitor'slocation,mapApachemodule,114echocommands,115,117GeoIPCity.
datdatabase,115geoip.
conf,114geo4.
php,115,118geo5.
php,118,119PHPglobalvariables,119srcattribute,116StaticMapMakertool,116sudosu,113Visitor'snativelanguageGEOIP_COUNTRY_CODEenvironmentalvariable,108geo3.
php,107geoscreenshot.
com,113testlocationlistCalifornia,109–110France,111Korea,112Seoul,112Strasburg,110webpagetest.
orghomepage,108WWebpage,editing,141–145Webpagetesting,IPaddress,147webpagetest.
orghomepage,98–99WebRedirectoption,134Webscraping,219,241argsarray,258awk,259categoriesmenu,246–247echocommands,260file.
txt,254,260forloop,260grep,259HTMLsourcecode,249–250ISBN,249,254,260Linux,248MySQLdatabase,253–254productlink,249shellprogramtesting,264–268shell.
sh,254–257,262URL,category,247wget,259,261Webscraping,MySQLandLinuxShellURLaddressbar,244–245Apresshomepage,243–244ASIN,241,243ISBN,243WebServer,93wget(webget)command,257whereclause,235whileloop,152Whoisinstallation,commandline,148–149Wiresharkpacketanalyzer,361X,Y,ZXMLHttpRequest(),489Virtualhosts(vhosts)(cont.
)
天上云服务器怎么样?天上云是国人商家,成都天上云网络科技有限公司,专注于香港、美国海外云服务器的产品,有多年的运维维护经验。世界这么大 靠谱最重,我们7*24H为您提供服务,贴心售后服务,安心、省事儿、稳定、靠谱。目前,天上云香港大带宽物理机服务器572元;20Mbps带宽!三网CN2线路,香港沙田数据中心!点击进入:天上云官方网站地址香港沙田数据中心!线路说明 :去程中国电信CN2 +中国联通+...
Virtono是一家成立于2014年的国外VPS主机商,提供VPS和服务器租用等产品,商家支持PayPal、信用卡、支付宝等国内外付款方式,可选数据中心共7个:罗马尼亚2个,美国3个(圣何塞、达拉斯、迈阿密),英国和德国各1个。目前,商家针对美国圣何塞机房VPS提供75折优惠码,同时,下单后在LET回复订单号还能获得双倍内存的升级。下面以圣何塞为例,分享几款VPS主机配置信息。Cloud VPSC...
MechanicWeb怎么样?MechanicWeb好不好?MechanicWeb成立于2008年,目前在美国洛杉矶、凤凰城、达拉斯、迈阿密、北卡、纽约、英国、卢森堡、德国、加拿大、新加坡有11个数据中心,主营全托管型虚拟主机、VPS主机、半专用服务器和独立服务器业务。MechanicWeb只做高端的托管vps,这次MechanicWeb上新Xeon W-1290P处理器套餐,基准3.7GHz最高...
phpecho为你推荐
画风不同神情相同的各种"2018年中文图书第5期新书通报",,,,,长江航道周服务信息微信小程序直播功能准入要求我研制千万亿次超级电脑支持ipad支持ipad支持ipad支持ipadboxiphone
1g虚拟主机 上海vps 北京vps 主机屋 国外主机 息壤备案 php主机 xen 国外免费空间 网通代理服务器 域名转接 广州服务器 天翼云盘 电信网络测速器 申请免费空间 阿里云邮箱登陆地址 七十九刀 windowsserver2012r2 windowsserver2008 reboot 更多