PHP operating the file
时间:2007-10-25 来源:heavenflying
You can easily operate the files with php. However, you should notice an important point. The privilege of the folders contain the file should be open to you!
$fh = fopen('test/test.file','wb');
if(is_writable('test/test.file') == false)
print "this file can't be writen!";
if (! $fh) {
print "Error opening test.file ";
}else{
fwrite($fh, "test the file operation with php\n");
}
fclose($fh);
$fh = fopen('test/test.file','wb');
if(is_writable('test/test.file') == false)
print "this file can't be writen!";
if (! $fh) {
print "Error opening test.file ";
}else{
fwrite($fh, "test the file operation with php\n");
}
fclose($fh);
相关阅读 更多 +
排行榜 更多 +