smagA-galva Posted March 14, 2007 Report Posted March 14, 2007 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!!!
4e4en Posted March 14, 2007 Report Posted March 14, 2007 pamēģini nomainīt $w=mysql_fetch_array($q); pret $w=mysql_fetch_assoc($q);
andrisp Posted March 14, 2007 Report Posted March 14, 2007 It kā jau mysql_fetch_array funkcija atgriež gan asociatīvo, gan "numerisko" masīvu, ja tai netiek pateikts savādāk.
andrisp Posted March 14, 2007 Report Posted March 14, 2007 Un, protams, kas par vainu bija, neteiksi ?
smagA-galva Posted March 14, 2007 Author Report Posted March 14, 2007 piiiiidooood!!! uploads/__".$w['bilde2'] - ar sho man aizgaaja.. nesaprotu kur saakumaa nomiseejos... neveikli!
smagA-galva Posted March 14, 2007 Author Report Posted March 14, 2007 bet iespeejams, ka kaadam reiz noderees!!!
Recommended Posts