Home >php教程 >php手册 >php对文件操作

php对文件操作

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 09:42:151241browse

1.打开文件、关闭目录、读取文件

opendir closedir readdir


运行



2.创建目录 mkdir喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PGltZyBzcmM9"http://www.2cto.com/uploadfile/Collfiles/20140303/20140303094606311.png" alt="\">

运行

创建成功!

同样 删除目录的函数是rmdir


3.改变当前目录

chidir

获取当前目录getcwd


代码


运行



4.打开文件及写入文件、删除文件

fopen fwrite unlink


a :以写入方式打开


打开test文件



成功!


接下来是删除文件的测试



测试







Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn