跪求 PHP文件读写流的问题

来源:百度知道 编辑:UC知道 时间:2024/06/03 18:18:43
想请问一下这几个方法分别是做什么用的?主要是最后那个方法不懂?最好是标记注释。在下在这里谢过了。。虽然分数不多,但是没有办法了。只有这么多了.感激不尽....
<?php
class Account_Del
{
///Create File
function Create_file($sFile)
{
if (!file_exists($sFile))
{
$fp= fopen($sFile,"w+");
system('chown apache '.$sFile);
fclose($fp);
}
}

///Delete File
function Delete_file($sFile)
{
if(file_exists($sFile))
unlink($sFile);
}

function DelAcc()
{
if(!file_exists("./ac/aclist.ini"))
exit;
$fp =@fopen("./ac/aclist.ini","r");
$temp="";
while(!feof($fp))
{
$temp=$temp.fgets($fp);
}
$flag=false;
$temp=str_replace("\r\n","",$temp);
$Accounts=explode(",",$temp);
$time = time();
$nowdate = date('Y-m-d', $time);

面是aclist.ini文件的信息=分别是 用户名 创建时间 终止时间
root&&,bin&&,daemon&&,adm&&,lp&&,sync&&,shutdown&&,halt&&,mail&&,news&&,uucp&&,operator&&,games&&,gopher&&,ftp&&,nobody&&,ntp&&,rpc&&,vcsa&&,nscd&&,sshd&&,rpm&&,mailnull&&,smmsp&&,rpcuser&&,mis0810&2009-08-26&2035-12-31,mis0811&2009-08-11&2009-08-25,philips&2009-08-11&2009-08-25,vt_temp&2009-08-12&2009-08-26,sonosys&2009-08-13&2009-08-27,R3916&2009-08-13&2009-08-27,www888&2009-08-14&2009-08-28,simtec&2009-08-17&2009-08-31,puppy&2009-08-18&2009-09-