[nycphp-talk] Moving a file

Jon Baer jonbaer at
Sat Sep 23 13:49:37 EDT 2006

Yeah all they would have to do is patch this function:

To move_file without the _POST/_FILE checks and you would be good to  
go, but I would think its a major security concern to have the www  
user moving files around.

- Jon

On Sep 23, 2006, at 1:22 PM, David Krings wrote:

> Hi,
> after looking around for a while it appears as that there is no single
> command to move a file from A to B. I know that I can first copy  
> the file
> and then delete the source. In order to do so I'd need to check if  
> the copy
> was successful and then check if the delete was successful. Is that  
> so or
> am I just too dense to read the docs right?
> Answering my own question but assuming that this may be interesting  
> for
> some, I am not to dense. OK, that wasn't too interesting, I admit.  
> What is
> interesting is that there is indeed no move function per sé, but I  
> saw at
> that you can  
> abuse
> the rename function to move a file...and potentially rename it at  
> the same
> time.
> Rarely found a case where a workaround is better than the desired  
> solution.
> David K.
> _______________________________________________
> New York PHP Community Talk Mailing List
> NYPHPCon 2006 Presentations Online
> Show Your Participation in New York PHP

More information about the talk mailing list