intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

GET vs. POST

Chia sẻ: Qweqwdasd Qweqdasda | Ngày: | Loại File: PDF | Số trang:2

70
lượt xem
5
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Có hai cách để truyền dữ liệu giữa máy chủ và Flash khi làm việc với kịch bản phía máy chủ: thông qua GET hoặc POST qua. Hai kỹ thuật cho việc gửi các biến và các giá trị liên quan của họ thường xuyên được sử dụng trong các trang HTML và Flash bất cứ khi nào dữ liệu đã nhập vào một biểu mẫu được gửi tới một máy chủ để được xử lý. (Chúng tôi sẽ thảo luận về các phương pháp cụ thể trong các bài tập sau đây) Khi bạn gửi các biến bằng cách...

Chủ đề:
Lưu

Nội dung Text: GET vs. POST

  1.     < Day Day Up > GET vs. POST There are two ways to transfer data between the server and Flash when working with server-side scripts: via GET or via POST. These two techniques for sending variables and their associated values are used in regular HTML pages and in Flash whenever data entered into a form is sent to a server to be processed. (We'll discuss the specific methods in the following exercises.) When you send variables using GET, you're simply concatenating variable name/value pairs onto the URL itself. For example, if you wanted to use GET to send my name and email address to a script located on the register.asp page, you'd specify the URL as follows: http://www.somedomain.com/register.asp?name=jobe&email=jobe@electrotank.com The question mark (?) tells the script and server that everything that follows comprises variables. Although GET is easier to use than POST, it won't work for every situation because it has a 1024-character limit. Now let's take a look at how POST is used. When variable data is sent using POST, that data is contained within the header of the HTTP request, which means you cannot see it being transferred. This gives you an added layer of security since the variables are not easily read. Because POST doesn't have a character limit, it provides a slightly more versatile way of sending variable data.
  2. We'll return to the topic of GET and POST in the exercise that accompanies the next section, "Using the LoadVars Class." NOTE Because GET and POST are not always easily interchangeable, most server-side scripts are programmed to accept variables via either GET or POST, but usually not both. < Day Day Up >  
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2