我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

为什么有'。' 和'..'当我们scandir函数[重复]

This question already has an answer here:

  • Why is it whenever I use scandir() I receive periods at the beginning of the array? 5 answers

When we use scandir function.it will display the all the files and directories inside the directory,which we pass in the scandir function as argument. But it also add two more element . and ..

I want to know why these two element is showing?

</div>

They are directories. The . is the current directory and the .. is the parent directory You can try cd into this directories like this:

cd .

'.' is current directory

'..' is parent directory

近期文章

  • too long
  • 在建立土壤侵蚀危险性模型运行时出现错误999999,如何解决?
  • 在配置java JDK环境变量时,使用&JAVA_HOME&设置无效
  • 【PHP】 一个关于PHP传参的问题,有大神可以帮我实现?
  • PHP图片上传麻烦
  • 获取最新的newspost数据库
  • 如何在PHP中获取URL的最后两部分?
  • Json用PHP mysql和Jquery
  • 如何在Laravel中返回最后添加的id
  • JQuery没有使用新的DOM元素[重复]
  • Jquery DIV.css显示无,但在div中显示一个div
  • 更可靠的LAST_INSERT_ID解决方案[重复]
  • too long
  • 需要一个正则表达式来获取php中图像url的宽度和高度
  • PDO上的sqlite3外键
  • too long
  • 来自Guestbook的PHP脚本不会添加到MySQL [关闭]
  • 从7年开始
  • CakePHP:将所有404错误重定向到主页?
  • 不推荐使用:函数eregi()已弃用[重复]

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华