云虚拟主机支持 ASP / PHP5.2-8.4 / ASP.NET 1.1-4.8 送 MYSQL和MSSQL两个数据库,全面完美兼容各种主流程序。高IO性能 NVME SSD硬盘存储,附送CDN网站加速,高带宽,8大机房,BGP线路, 免备案。
代码如下:<?phpheader("Content-type: text/html; charset=utf8");/** * 递归遍历文件 * @param string $path 目录路径 * @param int $deep=0 当前目录的深度 */function readDir...
查看更多 →
一维数组遍历(普通) 一、for与foreach遍历结果顺序一致 $arr = array('max','xiaoli','xiaowang','laosan'); //for遍历 for($i=0;$i<count($arr);$i++){ echo $arr[$i];//max xiaoli xiaowang laosan } //for...
1.概念 本地存储分为cookie,以及新增的localStorage和sessionStorage (1)cookie存储在本地,容量最大4k,在同源的http请求时携带传递,损耗带宽,可设置访问路径,只有此路径及此路径的子路径才能访问此cookie,在设置的过期时间之前有效。 服务器环境运行: <!doctype html><html&...
本地切换并创建新分支 git checkout -b 'doclever_201909' 拉取远程分支 git pull 报错 here is no tracking information for the current branch. 根据提示输入 git branch --set-upstream-to=origin/doclever_...
<?php $path='./'; if(isset($_GET['dir'])){ $path=$path.$_GET['dir']; } $dh=opendir($path); if($dh===false){ echo '打开出错'; ex...
获取文件夹路径: dirname($path) 获取文件名: basename($path) 获取文件后缀: pathinfo($path,PATHINFO_EXTENSION) 示例:a. 代码: <?php $path = "a/b/lee.jpg"; $dir = dirname($path); $file = basename($path); ...