1. file_put_contents("a.txt", "hello world", FILE_APPEND); //如果不加FILE_APPEND则表示覆盖式的写入文件,这个函数相当于fopen,fwrite和fclose()。
2. file():把整个文件读取一个索引数组中,[0],[1]...[n],每一行作为数组中一个元素。
数组常用函数整理:
1. array_slice(array,start,length,preserve):提取数组中元素
1. file_put_contents("a.txt", "hello world", FILE_APPEND); //如果不加FILE_APPEND则表示覆盖式的写入文件,这个函数相当于fopen,fwrite和fclose()。
2. file():把整个文件读取一个索引数组中,[0],[1]...[n],每一行作为数组中一个元素。
数组常用函数整理:
1. array_slice(array,start,length,preserve):提取数组中元素