2019PHP面试题大全【PHP基本部分】
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">教程<span style="color: black;">举荐</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">文案</span>内容</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">作者:From China </p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">源自</span>:CSDN</p>原文:https:<span style="color: black;">//blog.csdn.net/weixin_43243070/article/details/86058624</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1、PHP语言的一大<span style="color: black;">优良</span>是跨平台,什么是跨平台?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">PHP的运行环境最优搭配为Apache+MySQL+PHP,此运行环境<span style="color: black;">能够</span>在<span style="color: black;">区别</span>操作系统(例如windows、Linux等)上配置,不受操作系统的限制,<span style="color: black;">因此</span>叫跨平台</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">2、WEB<span style="color: black;">研发</span>中数据提交方式有几种?有什么区别?百度<span style="color: black;">运用</span>哪种方式?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">Get与post两种方式</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">区别:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)url可见性:get 方式url参数可见,post 不可见</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)可缓存性:get 方式是<span style="color: black;">能够</span>缓存的,post 方式不<span style="color: black;">能够</span>缓存。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)传输数据<span style="color: black;">体积</span>:get<span style="color: black;">通常</span>传输数据<span style="color: black;">体积</span>不超过2k-4k(<span style="color: black;">按照</span>浏览器<span style="color: black;">区别</span>,限制不<span style="color: black;">同样</span>,但相差不大);post 请求传输数据的<span style="color: black;">体积</span><span style="color: black;">按照</span>php.ini 配置文件设定,<span style="color: black;">亦</span><span style="color: black;">能够</span>无限大。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)数据传输上:get 方式<span style="color: black;">经过</span>url<span style="color: black;">位置</span>栏拼接参数进行传输,post 方式<span style="color: black;">经过</span>body体进行传输。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">意见</span>:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1、get式安全性较Post式要差些<span style="color: black;">包括</span>机密信息<span style="color: black;">意见</span>用Post数据提交式;</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2、做数据<span style="color: black;">查找</span><span style="color: black;">意见</span>用Get式;做数据添加、修改或删除<span style="color: black;">意见</span>用Post方式;</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">百度<span style="color: black;">运用</span>的get方式,<span style="color: black;">由于</span><span style="color: black;">能够</span>从它的URL中看出</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3、<span style="color: black;">把握</span>PHP的<span style="color: black;">那些</span>框架、模板引擎、系统等</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">框架:框架有<span style="color: black;">非常多</span>,例如CI、Yii、Laravel等等,咱们学过的是thinkphp</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">模板引擎:<span style="color: black;">亦</span>有<span style="color: black;">非常多</span>,在课本中有,咱们学过的是smarty</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">系统:有<span style="color: black;">非常多</span>,例如:康盛的<span style="color: black;">制品</span>(uchome、supesite、discuzX等),帝国系统、DEDE(织梦)、ecshop等,咱们学过的是DEDECMS、Ecshop</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">4、说一下你所<span style="color: black;">把握</span>的网页前端技术有<span style="color: black;">那些</span>?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">熟悉</span><span style="color: black;">把握</span>DIV+CSS网页布局,JavaScript,jQuery框架、photoshop<span style="color: black;">照片</span>处理</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">5、AJAX的<span style="color: black;">优良</span>是什么?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">ajax是异步传输技术,<span style="color: black;">能够</span><span style="color: black;">经过</span>javascript实现,<span style="color: black;">亦</span><span style="color: black;">能够</span><span style="color: black;">经过</span>JQuery框架实现,实现局部刷新,减轻了服务器的压力,<span style="color: black;">亦</span><span style="color: black;">加强</span>了用户体验。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">6、安全对一套程序<span style="color: black;">来讲</span>至关重要,请说说在<span style="color: black;">研发</span>中应该<span style="color: black;">重视</span><span style="color: black;">那些</span>安全机制?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)<span style="color: black;">运用</span>验证码防止注册机灌水。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)<span style="color: black;">运用</span>预处理,绑定参数,参数过滤转义 防止sql注入</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)<span style="color: black;">运用</span>token防止远程提交,<span style="color: black;">运用</span>token验证登录状态。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">7、在程序的<span style="color: black;">研发</span>中,<span style="color: black;">怎样</span><span style="color: black;">加强</span>程序的运行效率?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)优化SQL语句,<span style="color: black;">查找</span>语句中<span style="color: black;">尽可能</span>不<span style="color: black;">运用</span>select *,用哪个字段查哪个字段;少用子<span style="color: black;">查找</span>可用表连接代替;少用模糊<span style="color: black;">查找</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)数据表中创建索引。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)对程序中经常用到的数据生成缓存(<span style="color: black;">例如</span><span style="color: black;">运用</span>redis缓存数据,<span style="color: black;">例如</span><span style="color: black;">运用</span>ob进行动态页面静态化等等)。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)对mysql做主从复制,读写分离。(<span style="color: black;">加强</span>mysq执行效率和<span style="color: black;">查找</span>速度)</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)<span style="color: black;">运用</span>nginx做负载<span style="color: black;">平衡</span>。(将<span style="color: black;">拜访</span>压力平均分配到多态服务器)</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">8、PHP可否与其它的数据库搭配<span style="color: black;">运用</span>?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">PHP与MYSQL数据库是最优搭配,当然PHP<span style="color: black;">亦</span><span style="color: black;">能够</span>去其它的数据库搭配<span style="color: black;">运用</span>,例如PostgreSql,SqlServer,Oracle,SqlLite等。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">9、<span style="color: black;">此刻</span>编程中经常采取MVC三层结构,请问MVC分别指哪三层,有什么优点?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">MVC三层分别指:业务模型、视图、<span style="color: black;">掌控</span>器,由<span style="color: black;">掌控</span>器层调用模型处理数据,<span style="color: black;">而后</span>将数据映射到视图层进行<span style="color: black;">表示</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">优点是:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">①<span style="color: black;">能够</span>实现代码的重用性,避免产生代码冗余;</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">②M和V的实现代码分离,从而使同一个程序<span style="color: black;">能够</span><span style="color: black;">运用</span><span style="color: black;">区别</span>的表现形式</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">十、</span>对json数据格式的理解?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,json数据格式固定,<span style="color: black;">能够</span>被多种语言用作数据的传递。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">PHP中处理json格式的函数为json_decode( string $json [, bool $assoc ] ) ,接受一个 JSON格式的字符串并且把它转换为PHP变量,参数json待解码的json string格式的字符串。assoc当该参数为TRUE时,将返回array而非object;</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Json_encode:将PHP变量转换成json格式。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">11、Print、echo、print_r有什么区别?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1) echo和print都<span style="color: black;">能够</span>做输出,<span style="color: black;">区别</span>的是,echo不是函数,<span style="color: black;">无</span>返回值,而print是一个函数有返回值,<span style="color: black;">因此</span>相对而言<span style="color: black;">倘若</span>只是输出echo会更快,而print_r<span style="color: black;">一般</span>用于打印变量的<span style="color: black;">关联</span>信息,<span style="color: black;">一般</span>在调试中<span style="color: black;">运用</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2) print 是打印字符串</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)print_r 则是打印复合类型 如数组 对象</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">12、SESSION与COOKIE的区别?</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)存储位置:session存储于服务器,cookie存储于浏览器</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)安全性:session安全性比cookie高</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)session为‘会话服务’,在<span style="color: black;">运用</span>时需要开启服务,cookie不需要开启,<span style="color: black;">能够</span>直接用</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">13、PHP处理数组的常用函数?(重点看函数的‘参数’和‘返回值’)</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)array() 创建数组</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)in_array() 判断元素<span style="color: black;">是不是</span>在数组中</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)count() 返回数组中元素的数目</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)array_merge() 将多个数组合并成一个数组</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)array_diff() 比较两个或两个以上数组的差异</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(6)array_intersect() 获取两个或两个数组以上的交集</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(7)array_keys() 获取数组的key列表</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(8)array_values() 获取数组的值列表</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(9)array_unique() 删除数组中的重复值</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(10)array_push()将一个或多个元素<span style="color: black;">插进</span>数组的末尾(入栈)</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(11)array_pop() 弹出并返回 array 数组的最后一个单元(出栈)</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(12)array_walk() <span style="color: black;">运用</span>用户自定义函数对数组中的<span style="color: black;">每一个</span>元素做回调处理</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">14、PHP处理字符串的常用函数?(重点看函数的‘参数’和‘返回值’)</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)trim() 移除字符串两侧的空白字符和其他字符;</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)strlen() 获取字符串的长度</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)mb_strlen() 获取字符串长度(可指定字符编码,对中文字符串计算长度)</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)substr()返回字符串的一部分;</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)str_replace() 子字符串替换</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(6)str_repeat () 重复一个字符串</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(7)is_string() 检测变量<span style="color: black;">是不是</span>是字符串;</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(8)str_shuffle () 随机打乱一个字符串</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(9)sprintf() 返回<span style="color: black;">按照</span>格式化字符串生成的字符串(<span style="color: black;">一般</span>用于获取分表后的数据表名)</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(10)strstr() <span style="color: black;">查询</span>字符串的首次<span style="color: black;">显现</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(11)addslashes <span style="color: black;">运用</span>反斜线引用字符串</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">15、PHP处理时间的常用函数?(重点看函数的‘参数’和‘返回值’)</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)date() 格式化一个本地时间/日期。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)getdate() 取得日期/时间信息。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)date_default_timezone_set() 设定默认时区。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)date_default_timezone_get() 返回默认时区。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)mktime() 返回一个日期的 Unix时间戳。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(6)strtotime() 将任何字符串的日期时间描述解析为 Unix 时间戳</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(7)strftime() <span style="color: black;">按照</span>区域设置格式化本地时间/日期</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">16、PHP处理数据库的常用函数?(重点看函数的‘参数’和‘返回值’)</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">请参照php手册,认真查看,此项非常重要</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">17、PHP操作文件的常用函数?(重点看函数的‘参数’和‘返回值’)</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)打开文件 fopen()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)读取文件 fgets() ; 注:file_get_contents()<span style="color: black;">亦</span>是读取文件</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)写入文件fwrite() ; 注:file_put_contents()<span style="color: black;">一样</span><span style="color: black;">能够</span>写入文件</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)关闭文件句柄 fclose()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)移动 / 重命名文件 rename()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(6)复制文件 copy()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(7)创建文件 vim 或 touch</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(8)删除文件 unlink()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(9)获取文件上次<span style="color: black;">拜访</span>的时间 fileatime()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(10)获取文件上次修改的时间 filemtime()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(11)获取文件<span style="color: black;">体积</span> filesize()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(12)获取文件类型 filetype()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(13)获取文件<span style="color: black;">仔细</span>信息 state()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(14)判断<span style="color: black;">是不是</span>是目录 is_dir()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">18、PHP操作目录(文件夹)的常用函数?(重点看函数的‘参数’和‘返回值’)</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)打开目录 opendir()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)读取目录 readdir()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)删除目录 rmdir()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)关闭目录句柄 closedir()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)创建目录 mkdir()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(6)返回路径中的目录部分 dirname()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(7)取得当前工作目录 getcwd()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(8)列出指定路径中的文件和目录 scandir()</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">以上是<span style="color: black;">文案</span><span style="color: black;">所有</span>内容,有学习与经验交流的<span style="color: black;">能够</span>加</strong><span style="color: black;"><strong style="color: blue;">PHP自学中心</strong></span><strong style="color: blue;">。<span style="color: black;">一块</span>学习,交流与进步!</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">让学习<span style="color: black;">作为</span>一种习惯</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">微X</span>公众号:php自学中心</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">长按二维码关注</p><img src="https://mmbiz.qpic.cn/mmbiz_jpg/QibLP1rpwH8swmfjfun23dkmdbD0b7fDJOIVyd2ibtJfSH4OlDGOwmLCUfKBaZAQaro9SBhOo0v2XicmdicTYGdLWw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">学习 | 交流 | 分享 | <span style="color: black;">文案</span></span></p>
我深受你的启发,你的话语是我前进的动力。 我深受你的启发,你的话语是我前进的动力。 系统提示我验证码错误1500次 \~゛, 楼主果然英明!不得不赞美你一下! seo常来的论坛,希望我的网站快点收录。
页:
[1]