PHP常用函数
PHP 预定义变量
| $_SERVER["REMOTE_ADDR"]; |
| $_SERVER["SERVER_ADDR"]; |
| $_SERVER['SCRIPT_FILENAME'].$_SERVER['REQUEST_URI']; |
| $_SERVER['QUERY_STRING']; |
PHP 错误处理函数
PHP 变量处理函数
PHP 字符串函数
| echo |
| explode |
| print |
| mb_substr |
PHP 数组函数
| |
| array_keys() |
| array_values() |
| array_flip() |
| array_key_exists() |
| array_search() |
| |
| |
| array_slice() |
| array_merge() |
| array_chunk() |
| |
| |
| array_splice() |
| array_pad() |
| array_push() |
| array_pop() |
| array_shift() |
| array_unshift() |
| array_fill() |
| array_fill_keys() |
| |
| |
| array_sum() |
| array_product() |
| |
| |
| is_array() |
| array_rand() |
| shuffle() |
PHP 文件系统函数
| file_get_contents() |
| move_uploaded_file() |
| pathinfo() |
| |
PHP MySQL函数
| mysql_fetch_row() |
| mysql_fetch_array() |
cURL函数
| curl_init |
| curl_setopt |
| curl_exec |
| curl_close |
时间处理函数
| strtotime() |
| 参数: |
| am : the time is before noon 上午 |
| pm : the time is noon or later 下午 |
| year: one year; for example, “next year” 年,比如“next year”代表明年 |
| month : one month; for example, “last month” 月,比如“last month”代表上一月 |
| fortnight : two weeks; for example, “a fortnight ago” 两周,比如“a fortnight ago”代表两周前 |
| week : one week 周 |
| day: a day 天 |
| hour: an hour 小时 |
| minute : a minute 分钟 |
| min : same as minute 同“minute” |
| second : a second 秒 |
| sec : same as second 同“second” |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· 单线程的Redis速度为什么快?
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码