Jump to content
php.lv forumi

unlink rmdir


tiy

Recommended Posts

ps. atradu pats, bet nezin kapec ta jabut ka atkal pilnais celsh jaraksta.

 

foruma trukst f-jas dzest pasha savas topic'us, ka shito

 

man foldera mapite atrodas 3 bildes.jpg ar vinsh visu nolasa ja vaga izvada bilzu nosaukumu, bet negrib delete ne bildi ne folderu un nemet ara nekadu kludu pazinojumus kapec ?

 

$folder=mapite;

mkdir($folder, 0700);

 

$folder=mapite;	

if (is_dir($folder)) 
  {		  
	if ($dh = opendir($folder)) 
	  {
	   while (($file = readdir($dh)) !== false) 
			{				
			if ($file!='.' || $file!='..') unlink($folder.'/'.$file); //  unlink($file);	
	 		}
	   closedir($dh);
	  }
 } 
rmdir($folder);

Edited by tiy
Link to comment
Share on other sites

×
×
  • Create New...