==========字符处理函数=============
SQL语句保留字符转义
long get_magic_quotes_gpc(void)
string addslashes ( string str )
string stripslashes(string str)
字符的ASCII码
int ord(string string) 十进制
string chr(ascii) 十进制 八进制(0) 十六进制(0x)
string base_convert(string $number,int $frombase,int $tobase)
清理字符串空格
string trim(string,charlist) charlist,可选
string rtrim(string,charlist)
string ltrim(string,charlist)
改变字母大小写
string strtolower(string $str)
string strtoupper(string $str)
string ucfirst(string $str)
string ucwords(string $str)
截取字符串
array explode(separator,string,limit) limit,可选,返回的数组元素的最大数目
string substr(string,start,length)
int strlen(string)
string strstr(string,search) 大小写敏感
string stristr(string,search)
string str_repeat(string,repeat)
字符串查找
int strpos(string,find,start) start,可选
int substr_count(string,substring,start,length) start,length,可选
string str_replace(find,replace,string,count) count,可选。
string strrev(string $string) 字符翻转,限一个字节字符
html处理
string htmlspecialchars(string,quotestyle,character-set) quotestyle,character-set,可选。
htmlentities("
我爱你
",ENT_COMPAT,"GB2312")string htmlspecialchars_decode(string,quotestyle,character-set)
string htmlentities(string,quotestyle,character-set)
string html_entity_decode(string,quotestyle,character-set)
string strip_tags(string $str[,string $allowable_tags])
日期时间[Y-m-d H:i:s]
-----------------------------------
php 设置时区
1.代片断声明
date_default_timezone_set (PRC);
2.php.ini定义
date.timezone = "PRC"
-----------------------------------
double time(void)
float microtime(get_as_float) get_as_float,可选
string date(format,timestamp) timestamp,可选
array getdate(timestamp)
double mktime(hour,minute,second,month,day,year,is_dst)
array gettimeofday(return_float) return_float,可选,返回一个秒与微秒等时间信息的数组
URL处理
array parse_url(string $url(,int $component = -1])
string urlencode(string $str)
string urldecode(string $str)
获取PHP环境扩展与启用函数库
array get_loaded_extensions([bool $zend_extensions = false])
array get_extension_funcs(string $module_name)
PREC正则表达式
int preg_match ( string $pattern , string $subject [, array &$matches [, int $flags = 0 [, int $offset = 0 ]]] )
int preg_match_all ( string pattern, string subject, array matches [, int flags] )
mixed preg_replace ( mixed pattern, mixed replacement, mixed subject [, int limit] )
mysqli相关类
--mysqli类 PHP 和 MySQL 数据库之间的连接
---构造函数
---mysqli(host,user,pass,db)
---方法
---set_charset(gbk)
---character_set_name()
---select_db(db)
---query(sql)
---prepare(sql) sql:insert into table values(?,?)
---close()
---属性
---affected_rows
---error
--mysqli result类
---方法
---fetch_array()
---close()
---属性
---num_rows
--mysqli stmt类
---方法
---bind_param(type,var...)
---execute()
---close()
---属性
---affected_rows
---error
---num_rows
---field_count select统计属性

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

SecLists
SecLists是最終安全測試人員的伙伴。它是一個包含各種類型清單的集合,這些清單在安全評估過程中經常使用,而且都在一個地方。 SecLists透過方便地提供安全測試人員可能需要的所有列表,幫助提高安全測試的效率和生產力。清單類型包括使用者名稱、密碼、URL、模糊測試有效載荷、敏感資料模式、Web shell等等。測試人員只需將此儲存庫拉到新的測試機上,他就可以存取所需的每種類型的清單。

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

Atom編輯器mac版下載
最受歡迎的的開源編輯器

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)