*jancis38* Posted April 15, 2008 Report Share Posted April 15, 2008 Kods: if (!is_writable("fails.dat")) { $fails = "fails.dat"; unlink($fails); } Fails: fails.dat uzlikts uz Read-Only kā redzams kodā, Es vēlos pie Read-Only failu izdzēst, tikai unlink funkcija nenostrādā, kur varētu būt problēma? Link to comment Share on other sites More sharing options...
andrisp Posted April 15, 2008 Report Share Posted April 15, 2008 Atļaušos http://apblog.lv/2008/01/31/windows-read-o...dzesana-ar-php/ :) Link to comment Share on other sites More sharing options...
*jancis38* Posted April 15, 2008 Author Report Share Posted April 15, 2008 Vai es kautko nepareizi daru? Ierakstiju šādi: if (!is_writable("fails.dat")) { chmod('$fails', 0777); $fails = "fails.dat"; unlink($fails); } Nekas nenotiek. Link to comment Share on other sites More sharing options...
andrisp Posted April 15, 2008 Report Share Posted April 15, 2008 Nū, tu $fails definē pēc chmod. Link to comment Share on other sites More sharing options...
bubu Posted April 15, 2008 Report Share Posted April 15, 2008 Un vai zini arī atšķirību starp '$asdf' un "$asdf" ? Link to comment Share on other sites More sharing options...
*jancis38* Posted April 15, 2008 Author Report Share Posted April 15, 2008 (edited) Protams ka zinu, mēģināju ar abiem, nekas nenotiek. EDIT: Neuzmanības pēc pieļāvu kļūdu, varbūt tas tādēļ ka gulējis vel neesmu, labi paldies! Varat slēgt ciet. Edited April 15, 2008 by *jancis38* Link to comment Share on other sites More sharing options...
bubu Posted April 15, 2008 Report Share Posted April 15, 2008 mēģināju ar abiem, nekas nenotiek. Šis ļoti skaidri pasaka, ka tu nezini vis, ko tie divi pieraksti nozīmē. Link to comment Share on other sites More sharing options...
Recommended Posts