摘要: PHP file_put_contents() 函数是一次性向文件写入字符串或追加字符串内容的最合适选择。file_put_contents()file_put_contents() 函数用于把字符串写入文件,成功返回写入到文件内数据的字节数,失败则返回 FALSE。file_put_contents() 的行为实际上等于依次调用fopen(),fwrite()以及fclose()功能一样。在php中,用file_put_contents() 把字符串写入文件时,有时候发现写入的内容不能换行。如:test.php 的结果是:test.php 的结果是:<?php $a['1 阅读全文
posted @ 2013-09-11 14:36 oaijuru 阅读(1090) 评论(0) 推荐(0) 编辑