欢迎来到天天文库
浏览记录
ID:36972480
大小:20.59 KB
页数:3页
时间:2019-05-06
《php使用网络函数与协议函数》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、使用网络函数与协议函数file_get_contents—Readsentirefileintoastringgetmxrr—GetMXrecordscorrespondingtoagivenInternethostnamegetservbyname—GetportnumberassociatedwithanInternetserviceandprotocolparse_url—ParseaURLandreturnitscomponentscheckdnsrr—CheckDNSrecordscorrespondingtoagivenInternethostnameorIP
2、addressftp_connect—OpensanFTPconnectionftp_login—LogsintoanFTPconnectionftp_close/ftp_quit—ClosesanFTPconnectionfile_exists—Checkswhetherafileordirectoryexistsftp_mdtm—Returnsthelastmodifiedtimeofthegivenfilefopen—调用ftp_fget前要先将本地文件打开才能写入ftp_fget—DownloadsafilefromtheFTPserverandsavestoan
3、openfilefclose-写入完毕,关闭本地文件ftp_get—DownloadsafilefromtheFTPserver(更方便。不需要打开本地文件,只需要传递本地文件名即可)ftp_fput—UploadsfromanopenfiletotheFTPserver(先打开本地文件,再上传到FTP服务器)ftp_put—UploadsafiletotheFTPserver(不需要打开本地文件即可上传)set_time_limit—Limitsthemaximumexecutiontime(避免超时,当下载、上传大文件时用此函数指定更长的时间)ftp_size—Ret
4、urnsthesizeofthegivenfile(获得FTP服务器指定文件的大小,但并非所有FTP都支持)ftp_nlist—Returnsalistoffilesinthegivendirectory★★★★★★★★
此文档下载收益归作者所有