Blitz Posted October 5, 2005 Report Share Posted October 5, 2005 Nr:1 Kaa var taisit "traverse dir" ja dir stav uz ftp servera izmantojot rekursiju? Manuaali neatrodu kadu lidzigu funkciju "readdir", ko varetu piemerot ftp? Nr. 2 anonimajam lietotajam ir tiesibas brivi rikoties ar ftp failiem un direktorijam (dzest, kopet, ielikt utt.), kad teiksim izmantoju: $conn_id=ftp_connect("foto"); $a=ftp_mkdir($conn_id,"www"); tad izsviez ka access diened. Kapec taa, ja tiesibas ir to darit! Link to comment Share on other sites More sharing options...
Klez Posted October 5, 2005 Report Share Posted October 5, 2005 esi pareizajaa diraa? vai tiesiibas visu dariit ir uz saknes dir? paskaties chmod, kas staav uz taas diras ... bet ja jau nau tiesiibu tad nau ... :) Link to comment Share on other sites More sharing options...
Delfins Posted October 5, 2005 Report Share Posted October 5, 2005 Blin nu cik var atkārtot!!!!!!! LASI MANUĀLI - piemērs ir turpat!!!!! <?php function filecollect($conn_id,$dir='.') { static $flist=array(); if ($files = ftp_nlist($cid,$dir)){ foreach ($files as $file) { if (ftp_size($cid, $file) == "-1"){ filecollect($cid,$file); } else $flist[] = $file; } } return $flist; } $conn_id = ftp_connect('ftp.nowhere.com') or die("Couldn't connect to server"); if (@ftp_login($conn_id, 'anonymous', 'pass@nowhere.com')){ $filelist = filecollect($conn_id); echo "<pre>"; print_r($filelist); echo "</pre>"; } ?> Link to comment Share on other sites More sharing options...
Recommended Posts