$filename = '/data/webroot/usercode/code/test2.txt';
//写入一个字符串到$filename文件中
if(is_writeable($filename)){
file_put_contents($filename,'123321');
}
if(is_readable($filename)){
echo file_get_contents($filename);
}
//写入一个字符串到$filename文件中
if(is_writeable($filename)){
file_put_contents($filename,'123321');
}
if(is_readable($filename)){
echo file_get_contents($filename);
}
2016-03-07