今日学习PHP过程中的新知识

来源:互联网 发布:linux批量删除文件名 编辑:程序博客网 时间:2024/06/05 16:25

学习到的新函数:

1.isset()

2.function_exists()

3.unset():使用该方法销毁类的时候,会调用类的析构方法

4.str_replace(被替换的字符串,替换成的字符串,需要替换的字符串);

5.empty()

6.serialize()

7.unserialize()
字符串操作函数

8.trim()

9.itrim()

10.ltrim()

11.strlen()

11.mb_strlen():获取中文字符串长度

12.substr()

12.mb_substr()

13.strpos()

14.str_repalce()

15.sprintf()

16.imploade()

17.explode()

#字符串操作函数结束


#正则匹配的函数

18.preg_quote()

19.preg_match():返回一个数

20.preg_match_all()


#设置cookie的函数

$_COOKIE

setcookie()

ob_start()

ob_get_contents()

ob_clean()

nl2br();

header():可以通过该函数设置cookieheader("Set-Cookie:"text"="value"")

#设置session

session_start()

$_SESSION



#文件操作函数

file_exists()

file_get_contents()

is_file()

is_readable()

is_writeable()

fileowner()

filectime()

filemtime()

fileatime()

filesize()


#日期时间

time()

date()

strtotime()


#图形类

Graphic Device

imagecreatetruecolor()

imagecolorallocate()

imagefile()

imagepng()

imagedestroy()

学习到的新关键字:

1.clone


正则规则:

1.可以使用任意的分隔符,可以在pattern后面注明i,忽略大小写



原创粉丝点击