tailieunhanh - Web Server Programming phần 10

Rõ ràng, có rất nhiều sức mạnh tính toán liệu hiện có trong thế giới Net. Hãy suy nghĩ tất cả những Pentium 4 máy tính cá nhân với 256 MB của bộ nhớ, 40 GB dung lượng lưu trữ đĩa và tốc độ đồng hồ là 2,5 GHz trở lên, vĩnh viễn gắn liền với Internet thông qua modem DSL. | ASP basics request and response objects 553 Lookup request method in the servervariables associative array req_method REQUEST_METHOD if req_method GET then Canned text defining submit form with its map input button html head title Hunger title head body bgcolor white form action method post table frame border rules all align center caption Desperate for a Big Mac caption tr td rowspan 2 input type image src name map td td img src td tr tr th Click on map th tr table form body html Pick up with next part of scripting code now test for Post method note the form of the equality test within the conditional elseif req_method POST then If it is a post method then output standard response text with a little dynamically generated insert obtained by invoking the findMac subroutine html head title Your nearest MacDonalds . title head body h1 align center Your nearest MacDonalds h1 p align center img src p align center style font-size 24pt color blue dim x y Pick up the input data the data take the image name with .x and .y appended x y Invoke the findMac function it adds a line to the response call findMac x y p align center img src p body html 554 Active Server Pages ASP scripting else It is some unusual request method like Options Head Put Ignore it html head title Error title head body bgcolor white p Cannot handle requests of type req_method . body html end if Terminating if . then . elseif . else construct that tests request method The example code shown together with two image files the map and a McDonald s arches decorative image could be deployed in a subdirectory Examples of the C Inetpub wwwroot directory. The page can be accessed by pointing a browser at http localhost Examples . Adding session state Real web applications invariably need to maintain client data. It is the same old HTTP protocol underneath so the same

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.