<?php
$filename = '/data/webroot/usercode/code/test2.txt';
//写入一个字符串到ame文件中
file_put_contents($filename, 'hello world');
$fp = fopen('./test.txt', 'w');
fwrite($fp, 'hello');
fwrite($fp, 'world');
fclose($fp);两种打开文件的操作啊!
<?php
$filename = '/data/webroot/usercode/code/test2.txt';
//写入一个字符串到ame文件中
file_put_contents($filename, 'hello world');
$fp = fopen('./test.txt', 'w');
fwrite($fp, 'hello');
fwrite($fp, 'world');
fclose($fp);两种打开文件的操作啊!
2014-09-11
举报