PHP自学教程
-
我的PHP学习第二十二天之MySQL基础
MySQL客户端下,操作MySQL的步骤 第一步:连接到MySQL数据库服务器 mysql –uroot -root 第二步:选择要操作的数据库(当前数据库) use db_name 第三步:设置字符集 set names gbk 第四步:执行SQL语句:增…
-
我的php学习第二十天之MySQL基础篇
昨日回顾 登录MySQL客户端:mysql -hlocalhost -uroot -proot 显示数据库:show databases; 创建数据库:create database if not exists db_name charset utf8; //默认的字符集是latin1 上图表示:创建数据库…
-
php常用函数-(11)php的一些其他常用函数
base64_decode — 对使用 MIME base64 编码的数据进行解码 base64_encode — 使用 MIME base64 对数据进行编码 get_headers — 取得服务器响应一个 HTTP 请求所发送的所有标头 get_meta_tags — 从一个文件中提取所有的…
-
php常用函数-(10)php字符串处理常用的函数
addcslashes — 以 C 语言风格使用反斜线转义字符串中的字符 addslashes — 使用反斜线引用字符串 bin2hex — 将二进制数据转换成十六进制表示 chop — rtrim() 的别名 chr — 返回指定的字符 chunk_split — 将字符串分…
-
php常用函数-(9)php session处理方面的常用函数
session_cache_expire — Return current cache expire session_cache_limiter — Get and/or set the current cache limiter session_commit — session_write_close() 的别名 session_decode — Decodes session data…
-
php常用函数-(8)php正则处理常用函数
preg_grep — 返回与模式匹配的数组单元 preg_last_error — Returns the error code of the last PCRE regex execution preg_match_all — 进行全局正则表达式匹配 preg_match — 进行正则表达式匹配 preg_quote — 转…
-
PHP常用函数-(7)php处理文件流常用函数
flush — 刷新输出缓冲 ob_clean — Clean (erase) the output buffer ob_end_clean — Clean (erase) the output buffer and turn off output buffering ob_end_flush — Flush (send) the output buffer and turn off…
-
PHP常用函数-(6)php数据库操作常用的函数
PHP常用函数-(6)php数据库操作常用的函数
-
PHP常用函数-(5)php常用的数学函数以及数字处理函数
abs — 绝对值 acos — 反余弦 acosh — 反双曲余弦 asin — 反正弦 asinh — 反双曲正弦 atan2 — 两个参数的反正切 atan — 反正切 atanh — 反双曲正切 base_convert — 在任意进制之间转换数字 bindec — 二进制转换为十…
-
PHP常用函数-(4)php文件系统处理常用的函数
chdir — 改变目录 chroot — 改变根目录 dir — directory 类 closedir — 关闭目录句柄 getcwd — 取得当前工作目录 opendir — 打开目录句柄 readdir — 从目录句柄中读取条目 rewinddir — 倒回目录句柄 scandir — 列出…
-
PHP常用函数-(3)php时间处理常用的函数
checkdate — 验证一个格里高里日期 date_default_timezone_get — 取得一个脚本中所有日期时间函数所使用的默认时区 date_default_timezone_set — 设定用于一个脚本中所有日期时间函数的默认时区 date_time_set — Se…
-
PHP常用函数-(2)php一些不太常用的但非常实用系统级函数
call_user_method_array — 调用一个用户方法,同时传递参数数组(已废弃) call_user_method — 对特定对象调用用户方法(已废弃) class_exists — 检查类是否已定义 get_class_methods — 返回由类的方法名组成的数…
-
PHP常用函数大全-(1)php数组处理常用的函数
(1)php数组处理常用的函数 array_change_key_case — 返回字符串键名全为小写或大写的数组 array_chunk — 将一个数组分割成多个 array_combine — 创建一个数组,用一个数组的值作为其键名,另一个数组的值作为其值…
-
我的php学习第二十一天之php基础篇
昨日回顾 PHP变量 1)不需要提前定义,使用时直接赋一个值即可。 2)PHP的变量的命名规则,跟JS一样,允许的字符有:大小写英文字母、0-9、_ 3)PHP的变量必须以美元符号$开头;例如:$name=“周更生”; 4)PHP的变量…