[ Pobierz caÅ‚ość w formacie PDF ] .© National Instruments Corporation 7-5 Internet Developers Toolkit for GChapter 7 Getting Started with the G Web ServerSome HTML tags use optional additional attributes.For example, theparagraph tag can use the ALIGNMENT attribute to specify thehorizontal alignment of the paragraph.If you do not specify this attribute,the alignment of the paragraph does not change.This paragraph is centeredIf plain text in an HTML document contains characters reserved by HTML,such as , ", and &, you must encode it according to HTML conventions.For example, the string 3String InstrumentsWoodwind InstrumentsThe CGI Page VI looks at its parameters to generate a new page in whichit embeds the cookie.If another user connects to your store, that personreceives the same pages except with a different cookie value.Server-Side Cookie VIsThe G Web Server provides VIs for server-side cookie management.With these VIs, you can create and destroy cookies and add and queryinformation associated with cookies.Several VIs help you createHTTP connection-based cookies and documents that contain cookies.The G Web Server defines a server-side cookie as a cluster of two strings,cookie ID and address.The cookie ID string is used to identify a specificcookie and usually is embedded in the HTML document a CGI applicationcreates.The address string ensures that only clients with the same addresscan access a server-side cookie.This way, cookies created by requests froma specific client can be viewed and modified only by that client.Internet Developers Toolkit for G 8-26 © National Instruments CorporationChapter 8 Using the G Web ServerYou can use the following VIs to create, modify, and dispose of server-sidecookies.You can find these VIs in the Functions palette by selectingInternet Toolkit»CGI VIs»Cookie VIs.For more information about theseVIs, right-click on the VI and select Online Help from the VI pop-upmenu." Cookie Create VI Creates a unique cookie identifier to an emptycookie." Cookie Destroy VI Disposes of a cookie." Cookie Add Entry VI Adds an entry specified by a key and a valueto a cookie." Cookie Get Entry VI Returns the value of the entry specified by a keyfrom a cookie." Cookie Get Data VI Returns a Keyed Array that contains all theentries in a cookie." Not A Cookie VI Returns an invalid cookie." Not A Cookie? VI Tests the validity of a cookie.The G Web Server also provides several CGI Utility VIs that work withserver-side cookies in CGI applications.These VIs identify the cookies asparameters named Magic_Cookie.You can use the following VIs to work with server-side cookies in HTMLdocuments.You can find these VIs in the Functions palette by selectingInternet Toolkit»CGI VIs.For more information about these VIs,right-click on the VI and select Online Help from the VI pop-up menu." CGI Cookie VI Returns the cookie associated with the CGI requestor creates a new cookie given the env parameter and parameters of aCGI request if a Magic_Cookie parameter is present." CGI Spool Cookie VI Returns or creates a cookie associated with a.spool CGI request based on the cgi connection info parameter theCGI Read Request VI returns." CGI Add Params To Cookie VI Adds parameters to a cookie." CGI Build Cookie Document VI Loads a file from disk and replacesevery occurrence of the string -*Cookie*- with a cookie ID.© National Instruments Corporation 8-27 Internet Developers Toolkit for GChapter 8 Using the G Web ServerAdvanced Configuration OptionsWhen you configure your G Web Server, you edit the server configurationfiles to specify how the server behaves on your system.The following rules apply to all the G Web Server configuration files:" Case-insensitive entries Configuration entries are not case sensitive,except where pathnames on case-sensitive file systems are involved." Comment lines beginning with # Lines to ignore must begin with #." One directive per line Each line consists of:Directive data [data2.datan] Directive A keyword the server recognizes followed bywhitespace.Refer to Appendix A, Configuration Directives, formore information on each directive. data Specific to each directive.Additional data entries areseparated by whitespace." Extra whitespace ignored Embedded spaces between Directiveand data are ignored.To embed a space in the data without separatingit from any subsequent arguments, use a backslash (\) character beforethe space." Paths in UNIX format The path separator is /.All absolute pathsmust begin with this character. On Windows, the following code sets PathDirective to the pathC:\labview\web:PathDirective /c/labview/web On MacOS, the following code sets PathDirective to the pathMacintosh HD:LabVIEW.Notice that a \ precedes the space.PathDirective /Macintosh\ HD/LabVIEWYou must edit the following three main configuration files for your G WebServer:" Access Configuration Controls client access to certain directoriesand determines which features are available in different directories." Server Configuration Controls the technical aspects of serveroperation." Server Resource Map Configuration Controls document and scriptlocations and aliases.Internet Developers Toolkit for G 8-28 © National Instruments CorporationChapter 8 Using the G Web ServerAccess ConfigurationThe Access Configuration controls the following aspects of documentdirectories in a tree with the server:" Access Restricts access to a branch of the directory tree to only hostsand authenticated users you specify." Server Features Secures directories by disabling certain serverfunctions
[ Pobierz całość w formacie PDF ]
zanotowane.pldoc.pisz.plpdf.pisz.plhanula1950.keep.pl
|