|
bool mail(string to,string subject,string message,string [additional――headers]
//將 URL 字符串予以解析,并將結(jié)果返回數(shù)組中。返回的數(shù)組包括下列元素:scheme、host、port、path、query 與 fragment 等
array parse_url(string url)
//將字符串以 URL 編碼,例如空格就會變成加號。網(wǎng)頁中表單數(shù)據(jù)傳送就是用 urlencode 編碼后再送出
string urlencode(string str)
//將 URL 編碼后字符串還原
string urldecode(string str)
//可打開 FTP 服務(wù)器的鏈接。參數(shù) host 為 FTP 服務(wù)器的網(wǎng)址。參數(shù) port 通常省略,若 FTP 服務(wù)器的端口號(port)不是21時才需要加本參數(shù)。若無錯誤則返回連接代碼,失敗則返回 false
int ftp_connect(string host,int [port])
//可登入鏈接的 FTP 服務(wù)器。參數(shù) ftp_stream 和 password 為 FTP 服務(wù)器的使用者帳號及密碼,通常 anonymous 為公開的使用帳號,密碼則為某個電子郵件地址。成功則返回 true
bool ftp_login(int ftp_stream,string username,string password)
//用來取得目前在 FTP 服務(wù)器中的路徑。參數(shù) ftp_stream 為 FTP 的連接代碼。若有錯誤則返回 NULL
string ftp_pwd(int ftp_stream)
//用來回到上層目錄,也就是目前目錄的父目錄。參數(shù) ftp_stream 為 FTP 連接代碼。成功則返回 true
boolean ftp_cdup(int ftp_stream)
//用來前往下一層目錄。參數(shù) ftp_stream 為 FTP 的連接代碼。參數(shù) directory 為欲前往的目錄。成功返回 true,失敗則返回 false
bool ftp_chdir(int ftp_stream,string directory)
//返回給定目錄的文件名或數(shù)組
array ftp_nlist(int ftp_stream,string directory)
//按輸出行數(shù)組的方式返回某個目錄的詳細(xì)清單
array ftp_rawlist(int ftp_stream,string directory)
//可顯示遠(yuǎn)端 FTP 服務(wù)器的系統(tǒng),也就是等于對 FTP 服務(wù)器下 system 或 syst 指令。成功則返回字符串,如“215 UNIX Type: L8”,失敗則返回 false
string ftp_systype(int ftp_stream)
//用來下載指定的文件。參數(shù) ftp_stream 為 FTP 的連接代碼;參數(shù) local_file 為欲存在本地端的文件名;參數(shù) remote_file 為欲下載的文件名;參數(shù) mode 的值有 FTP_ASCII 及 FTP_BINARY 二種,分別表示文本文件或者是二進(jìn)制文件,成功則返回 true,失敗則返回 false
bool ftp_get(int ftp_stream,string local_file,string remote_file,int mode)
//下載文件,并存在已打開的本地文件中。參數(shù) fp 為本地端的已打開文件的文件指針
bool ftp_fget(int ftp_stream,int fp,string remote_file,int mode)
//用來上傳指定的文件。參數(shù) ftp_stream 為 FTP 的連接代碼;參數(shù) remote_file 為欲存在遠(yuǎn)端的文件名;參數(shù) local_file 為欲上傳的文件名;參數(shù) mode 的值有 FTP_ASCII 及 FTP_BINARY 二種
bool ftp_put(int ftp_stream,string remote_file,string local_file,int mode)
//向 FTP 主機(jī)發(fā)送 cmd 命令,該命令不是標(biāo)準(zhǔn)化,而是與服務(wù)器的主機(jī)操作系統(tǒng)有關(guān),可用于文件的訪問許可、組成員的操作
bool ftp_site(resource ftp_stream,string cmd)
//關(guān)閉 FTP 連接
bool ftp_quit(int ftp_stream)
//可傳回某個IP網(wǎng)址的主機(jī)域名。若執(zhí)行失敗,則傳回原來的IP網(wǎng)址
string gethostbyaddr(string ip_address)
//可傳回某個網(wǎng)絡(luò)主機(jī)的IP網(wǎng)址。若執(zhí)行失敗,則傳回原來的計算機(jī)域名hostname
string gethostbyname(string hostname)
//返回給定主機(jī)的IP地址列表
array gethostbynamel(string hostname)
//檢查給定的因特網(wǎng)主機(jī)名或IP地址是否存在DNS記錄,type 可以是 A、MX、NS、SOA、TPR、CNAME 或 ANY,默認(rèn)類型為 MX
int checkdnsrr(string host [,stringtype])
//獲得相應(yīng)于給定因特網(wǎng)主機(jī)名的 MX 記錄
php技術(shù):[PHP]實用函數(shù)6第1/2頁,轉(zhuǎn)載需保留來源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。