Jump to content
php.lv forumi

dzēst bildes


smagA-galva
 Share

Recommended Posts

esmu uploadojis bildes. piemeeram uploadoju bildi1 taa uploadojas kaa 2323.jpg un __2323.jpg

 

 

 

un ar sho meeeginu izdzeest

if(isset($_GET['del'])){
$q=mysql_query("select bilde1,bilde2,bilde3 from baze where id='{$_GET['del']}'");
$w=mysql_fetch_array($q);
unlink("uploads/".$w['bilde1']); unlink("uploads/".$w['bilde2']); unlink("uploads/".$w['bilde3']);


mysql_query("delete from baze where id='{$_GET['del']}'");
}

bet man tik izdzeeeesh bildi 2323.jpg... un paliek neizdzeesta bilde __2323.jpg

 

datu baazee bildes nosaukums saglabaajas kaa 2323.jpg bez __ , jos tas man ir tik mapee

 

buutu itkaa klaati japieraksta katrai bildei shis ( __ )

Piem.

unlink("uploads/"__.$w['bilde1']);
vai
unlink("uploads/__".$w['bilde2']); 
unlink("uploads/".__$w['bilde2']); 

bet shitie paņēmieni nedarbojas!!!

Link to comment
Share on other sites

 Share

×
×
  • Create New...