Đang chuẩn bị liên kết để tải về tài liệu:
PHP and MySQL Web Development - P80

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

PHP and MySQL Web Development - P80: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | Using FTP 367 Listing 17.4 Continued ftp_quit conn exit echo Logged in as user br check file times to see if an update is required echo Checking file time. br if file_exists localfile localtime filemtime localfile echo Local file last updated echo date G i j-M-Y localtime echo br else localtime 0 remotetime ftp_mdtm conn remotefile if remotetime 0 This doesn t mean the file s not there server may not support mod time echo Can t access remote file time. br remotetime localtime 1 make sure of an update else echo Remote file last updated echo date G i j-M-Y remotetime echo br if remotetime localtime echo Local copy is up to date. br exit download file echo Getting file from server. br fp fopen localfile w if success ftp_fget conn fp remotefile FTP_BINARY echo Error Could not download file ftp_quit conn exit 368 Chapter 17 Using Network and Protocol Functions Listing 17.4 Continued fclose fp echo File downloaded successfully close connection to host ftp_quit conn body html The output from running this script on one occasion is shown in Figure 17.4. Figure 17.4 The FTP mirroring script checks whether the local version of a file is up-to-date and downloads a new version if not. This is quite a generic script.You ll see that it begins by setting up some variables host ftp.cs.rmit.edu.au user anonymous password laura@tangledweb.com.au remotefile pub tsg teraterm ttssh14.zip localfile tmp writable ttssh14.zip The host variable should contain the name of the FTP server you want to connect to and the user and password correspond to the username and password you would like to log in with. Many FTP sites support what is called anonymous login that is a freely available username that anybody can use to connect. No password is required but it is a common courtesy to supply your email address as a password so that the system s administrators can see where their users are coming from. We have followed this convention here. The remotefile variable contains the path to the file we .

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.