Mikijs Posted April 21, 2008 Report Posted April 21, 2008 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) =/
andrisp Posted April 21, 2008 Report Posted April 21, 2008 Interesanti, ko tu domāji ar "paveras 644 chmods".. Bet vispār - veic vajadzīgās darbības jau php skriptā.
bubu Posted April 21, 2008 Report Posted April 21, 2008 Faila īpašnieku maina nevis ar chmod, bet gan ar chown
Recommended Posts