PHP常用函数
作培训的时候给学生总结的
目录函数库
-------------------
opendir + readdir + filetype
chdir 改变当前目录
-------------------
date + time
-------------------
fopen fread fwrite
-------------------
filesize/file/
-------------------
copy move_uploaded_file(上传安全拷贝)
-------------------
unlink(删除文件) rmdir/mkdir
-----------------------------
disk_free_space -- 返回目录中的可用空间
disk_total_space -- 返回一个目录的磁盘总大小
-----------------------------
basename/dirname
-----------------------------
字符串函数
md5/echo
explode/implode
-------------------------------------
addslashes/htmlspecialchars/trim 安全
-------------------------------------
strlen/substr
变量函数库
isset/empty/is_array/unset
intval/
print_r调试用的
调试有关的概念
print_r/echo/exit;
数组有关的
foreach($array as $key => $val)
count
-------------------------------
list($a, $b) = explode(',', $info);
加密解密
base64_decode/base64_encode
urlencode/urldecode
-------------------------------
数学函数库
ceil/floor
rand()随机数
-------------------------------
其他常用函数
setcookie/mail发邮件的
ob_start()/ob_end() + setcookie
header()
转自:浪湾博客
|