TAILIEUCHUNG - PHP & MySQL for Dummies- P7

Tham khảo tài liệu 'php & mysql for dummies- p7', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 8 Data In Data Out 281 _FILES fieldname name _FILES fieldname type _FILES fieldname tmp_name _FILES fieldname size For example suppose that you use the following field to upload a file as shown in the preceding section input type file name user_file If the user uploads a file named by using the form the resulting array that can be used by the processing program looks something like this _FILES user_file name _FILES user_file type text plain _FILES user_file tmp_name D WINNT _FILES user_file size 435 In this array name is the name of the file that was uploaded type is the type of file tmp_name is the path filename of the temporary file and 43 5 is the size of the file. Notice that name contains only the filename but tmp_name includes the path to the file as well as the filename. If the file is too large to upload the tmp_name in the array is set to none and the size is set to 0. The processing program must move the uploaded file from the temporary location to a permanent location. The general format of the statement that moves the file is as follows move_uploaded_file path tempfilename path permfilename The path tempfilename is available in the built-in array element _FILES fieldname tmp_file . The path permfilename is the path to the file where you want to store the file. The following statement moves the file uploaded in the input field given the name user_file shown earlier in this section move_uploaded_file _FILES user_file tmp_name c data The destination directory in this case c data must exist before the file can be moved to it. This statement doesn t create the destination directory. Allowing strangers to load files onto your computer is a security risk someone might upload malicious files. You want to check the files for as many factors as possible after they re uploaded using conditional statements to check file characteristics such as expected file type and size. In some cases for even more security it .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.