RE: Re[2]: [PHP] Moving Files/ Temporary Names

From: Date: Mon, 14 Jul 2003 21:40:29 +0000
Subject: RE: Re[2]: [PHP] Moving Files/ Temporary Names
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-155187@lists.php.net to get a copy of this message
In your application code ... you can implement a move() function that can either call the unix (mv) or windows (move) commands to move the file to another location (same permission restrictions apply). The thing about move is, its a copy + delete function in one, so you have to be careful about permissions. You might have permissions to copy, but not delete. -- If move is essentially a copy and delete- then this seems to be my best approach rather than using move_uploaded_file () as I do not have the tmp names. Want I want to do is to allow the user the option to upload a file, rename a file, delete a file and finally to move a file. move_uploaded_file() seems relevant at the time of uploading, but in my scenario this has happened long before and no the user wishes to change the permanant location of the file. Like any file/ directory handler. The final script could be on 'nix or windows so I want all funtions to be platform independent Cheers

« previous php.general (#155187) next »