Jump to content
php.lv forumi

Failu dzēšana ar safe mode


siicis

Recommended Posts

---------

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

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

×
×
  • Create New...