php常用函数
常用函数
预定义的超全局数组变量
$_SRVER $_ENV $_GET $_POST $_REQUEST $_FILES $_COOKIE $_SESSION $GLOBALS 数组相关处理函数
array_values() array_keys() in_array() array_search() array_key_exits() isset()
array_flip() array_reverse()
var_dump() foeach(){} list() each() current() key() next() prev() end() reset()
count()
array_count_values() array_unique()
array_fiter() array_walk()
error_reporting() array_map()
sort()
rsort usort() asort() asrort() uasort() ksort() krsort() uksort() natsort()
natcassesort() array_multisort()
array_slice() array_aplice() array_combine() array_merge() array_intersect() array_diff() array_push() array_pop() array_rand() shuffle() array_sum() range()
字符串常用函数
echo() print() die() printf() sprintf()
ltrim() rtrim() trim() str_pad() strtoupper() strtower() ucfirst() ucwords() n12br()
htmlentities() htmlspecialchars() stripslashes()
strip_tags() number_format() strrev() md5()
strnatcmp() strcmp() strcasecmp()
strstr() strpos() strrpos() substr()
str_replace() explode() implode() 正则
preg_match() preg_match_all() preg_replace() preg_split() preg_grep()
preg_replace_callback() 文件处理
is_file() is_dir() is_link() file_exists() filesize() is_readable() is_writable() is_executable() filectime() filemtime() fileatime() stat()
clearstatcache()
basename() dirname() pathinfo()
opendir()
readdir() closedir() rewinddir() glob() exec() system()
mkdir() rmdir() unlink() copy()
fopen() fclose() fwrite()
file_put_contents() fputs()
fread()
file_get_contents() fgets() fgetc() file() readfile() ftell() unlink() ftruncate() rename()
file_uploads menory_limit
upload_max_filesize post_max_size upload_tmp_dir
$_FILES[][‘neme’] $_FILES[][‘size’] $_FILES[][‘tmp_name’] $_FILES[][‘error’] $_FILES[][‘type’]
is_uploaded_file() move_uploaded_file()
header(‘content-type:image/gif’)
header(‘content-disposition:attachment;filename=”test.gif”’) header(‘content-length:’.filesize(1024)) readfile($s)
mysql数据库 COUNT() SUM() AVG() MAX() MIN()
mysql_fetch_row() mysql_fetch_assoc() mysql_fetch_array() mysql_fetch_object() mysql_free_result() mysql_num_fields() mysql_fecth_field()
因篇幅问题不能全部显示,请点此查看更多更全内容