siicis Posted January 5, 2006 Report Share Posted January 5, 2006 Tada problema: ir vajadziba izdzest failus. Unlink() nestrada, jo ir ieslegts safe mode. Nav ari iespejams to izdarit ar FTP komandam, jo priekš PHP FTP ir atslegts. Vai varetu but vel kadi veidi ka izdzest failus? Link to comment Share on other sites More sharing options...
Delfins Posted January 6, 2006 Report Share Posted January 6, 2006 Es bi darītu šitā move_uplaoded_file( $fails, '/dev/null' ); PS: ja tas ir windows, tad uztaisam tādu direktoriju, kuru ar sheduling iztukšojam... Link to comment Share on other sites More sharing options...
siicis Posted January 6, 2006 Author Report Share Posted January 6, 2006 diemzel nestrada. kludas pazinojuma nav. sistema ir freebsd. :( Link to comment Share on other sites More sharing options...
Grey_Wolf Posted January 6, 2006 Report Share Posted January 6, 2006 --------- If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE. If filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file() will return FALSE. Additionally, a warning will be issued. ----------- iesleedz briidinaajumus un tad paskaties.... P.S. varbuut ?? : rename( $fails, '/dev/null' ); Link to comment Share on other sites More sharing options...
siicis Posted January 6, 2006 Author Report Share Posted January 6, 2006 P.S. varbuut ?? :rename( $fails, '/dev/null' ); diemzel ne Warning: rename(): SAFE MODE Restriction in effect. The script whose uid is 1083 is not allowed to access /dev/null owned by uid 0 in /bla/bla/bla Link to comment Share on other sites More sharing options...
v3rb0 Posted January 6, 2006 Report Share Posted January 6, 2006 tāpēc jau tā ir *safe* mode ka nevarēs tā dzēst visu ko iedomājas. Link to comment Share on other sites More sharing options...
siicis Posted January 6, 2006 Author Report Share Posted January 6, 2006 liekas esmu uz pareiza cela - paspelejos ar rename(). tagad nevajadzigais fails tiek pardevets par "tukso" failu, kurs pie katras dzesanas maina saturu un rezultata nevajadzigais fails pazud. <?php $fails = "nevajadzigis.jpg"; $f2 = "a.jpg"; rename( $fails, $f2 ) or die("as"); ?> Link to comment Share on other sites More sharing options...
Delfins Posted January 6, 2006 Report Share Posted January 6, 2006 nu tur jau tas joks... ka līks konfigs... pieejai uz /dev/null bija jābūt... Tā tač vajadzīga herņa, kura izglābj dažādās situācijās ;) Link to comment Share on other sites More sharing options...
Recommended Posts