最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
PHP目录文件操作函数目录操作详谈
时间:2008-04-24 编辑:简简单单 来源:一聚教程网
|
● 写文件 和读取文件的方式一样,先看看是不是能写:
$file = ''dirlist.php''; 能写了的话可以使用file_put_contents函数写入: $file = ''dirlist.php''; file_put_contents函数在php5中新引进的函数(不知道存在的话用function_exists函数先判断一下)低版本的php无法使用,可以使用如下方式: $f = fopen($file, ''w''); 替换之. 写文件的时候有时候需要锁定,然后写: function cache_page($pageurl,$pagedata){ |