Jump to content
php.lv forumi

kopesana


Mikijs

Recommended Posts

Man ir skripts kurs kope un ievieto info no cita faila

<?
#-------------------------------------------------------------------------------------------
$myFile = date(Ymd).".c4";
if(!file_exists($myFile)){
 #-------------------------------------------------------------------------------------------
 copy("dummy", $myFILE);
 chmod($myFILE, 0666);
 #-------------------------------------------------------------------------------------------
 $fh = fopen($myFile, 'w') or die("can't open file");
 #-------------------------------------------------------------------------------------------
 $handle = @fopen("/home/users.csv", "r");
 if($handle) {
  while (!feof($handle)) {
  $theData=fgets($handle, 4096);
  $stringData = $theData;
  fwrite($fh, $stringData);
}
 }
 fclose($handle);
 #-------------------------------------------------------------------------------------------
 fclose($fh);
 #-------------------------------------------------------------------------------------------
}
?>

 

Tagad itka viss ir ok, parkope un viss ir pa skaisto.. bet :/

Es esmu user: Mikijs

bet man rada ka faila autors ir : apache un es tadejadi nevaru izpildit chmod($myFILE, 0666); ka var dabut lai nochmodu? ka man vajag, jo es tak izveidoju failu un nochmodoju un tikai pec tam ievadu info un man paveras 644 chmods (rrrw) =/

Link to comment
Share on other sites

×
×
  • Create New...