[PHP]實(shí)用函數(shù)10
更新時(shí)間:2007年11月08日 21:58:16 作者:
//將IP點(diǎn)分地址的字符轉(zhuǎn)化回IP v4格式地址
int ip2long(string ip_address)
//將IP v4格式地址轉(zhuǎn)化回IP點(diǎn)分地址的字符串
string long2ip(int proper_address)
//取得環(huán)境變量 varname,成功則傳回變量值,失敗由傳回false
string getenv(string varname)
//用來設(shè)定系統(tǒng)環(huán)境
void putenv(string setting)
//獲得當(dāng)前PHP腳本的屬主名
string get_current_user(void)
//調(diào)用function_name指定的用戶函數(shù)
string get_cfg_var(string function_name[,mixed parrameter[,mixed...]])
//返回與 service 關(guān)聯(lián)的端口(protocol),必須是TCP或UDP
int getservbyname(string service,string protocol)
//返回與 port 關(guān)聯(lián)的服務(wù)名(protocol),必須是TCP或UDP
string getservbyport(int port,string protocol)
//取絕對值
mixed abs(mixed number)
//開平方根
float sqrt(float arg)
//自然對數(shù)e的次方值
float exp(float arg)
//返回圓周率
double pi(void)
//四舍五入
double round(double val)
//計(jì)算大于指定數(shù)的最小整數(shù)
int ceil(float number)
//計(jì)算小于指定的最大整數(shù)
int floor(float number)
//取最大值
mixed max(mixed arg1,mixed arg2...mixed argn)
//取最小值
mixed min(mixed arg1,mixed arg2...mixed argn)
//取隨機(jī)數(shù)
int rand([int min],[int max])
//數(shù)制轉(zhuǎn)換
string base_convert(string number,int frombase,int tobase)
//格式化數(shù)字字符串
string number_format(float number,int[decimals],string[decpoint],string[thounsands_sep])
int ip2long(string ip_address)
//將IP v4格式地址轉(zhuǎn)化回IP點(diǎn)分地址的字符串
string long2ip(int proper_address)
//取得環(huán)境變量 varname,成功則傳回變量值,失敗由傳回false
string getenv(string varname)
//用來設(shè)定系統(tǒng)環(huán)境
void putenv(string setting)
//獲得當(dāng)前PHP腳本的屬主名
string get_current_user(void)
//調(diào)用function_name指定的用戶函數(shù)
string get_cfg_var(string function_name[,mixed parrameter[,mixed...]])
//返回與 service 關(guān)聯(lián)的端口(protocol),必須是TCP或UDP
int getservbyname(string service,string protocol)
//返回與 port 關(guān)聯(lián)的服務(wù)名(protocol),必須是TCP或UDP
string getservbyport(int port,string protocol)
//取絕對值
mixed abs(mixed number)
//開平方根
float sqrt(float arg)
//自然對數(shù)e的次方值
float exp(float arg)
//返回圓周率
double pi(void)
//四舍五入
double round(double val)
//計(jì)算大于指定數(shù)的最小整數(shù)
int ceil(float number)
//計(jì)算小于指定的最大整數(shù)
int floor(float number)
//取最大值
mixed max(mixed arg1,mixed arg2...mixed argn)
//取最小值
mixed min(mixed arg1,mixed arg2...mixed argn)
//取隨機(jī)數(shù)
int rand([int min],[int max])
//數(shù)制轉(zhuǎn)換
string base_convert(string number,int frombase,int tobase)
//格式化數(shù)字字符串
string number_format(float number,int[decimals],string[decpoint],string[thounsands_sep])
相關(guān)文章
php通過數(shù)組實(shí)現(xiàn)多條件查詢實(shí)現(xiàn)方法(字符串分割)
這篇文章主要介紹了php通過數(shù)組實(shí)現(xiàn)多條件查詢實(shí)現(xiàn)方法(字符串分割),需要的朋友可以參考下2014-05-05
PHP實(shí)現(xiàn)RSA簽名生成訂單功能【支付寶示例】
這篇文章主要介紹了PHP實(shí)現(xiàn)RSA簽名生成訂單功能,涉及php隨機(jī)字符串及編碼相關(guān)操作技巧,以及支付寶公鑰文件讀取與使用方法,需要的朋友可以參考下2017-06-06
php獲得網(wǎng)站訪問統(tǒng)計(jì)信息類Compete API用法實(shí)例
這篇文章主要介紹了php獲得網(wǎng)站訪問統(tǒng)計(jì)信息類Compete API用法,實(shí)例分析了php使用curl獲取Compete統(tǒng)計(jì)網(wǎng)站信息的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-04-04
php使用unset()刪除數(shù)組中某個(gè)單元(鍵)的方法
這篇文章主要介紹了php使用unset()刪除數(shù)組中某個(gè)單元(鍵)的方法,實(shí)例分析了unset函數(shù)在刪除數(shù)組單元時(shí)的使用技巧,需要的朋友可以參考下2015-02-02
php5 non-thread-safe和thread-safe這兩個(gè)版本的區(qū)別分析
從PHP5.2.10版本開始(現(xiàn)在有PHP5.2.10和5.3兩個(gè)版本),有None-Thread Safe與Thread Safe兩種版本的可供選擇,這兩種版本有何不同,作為使用者來說又應(yīng)該如何選擇呢?下面聚友將為您講述。2010-03-03

