[nycphp-talk] Moving a file
Jon Baer
jonbaer at jonbaer.com
Sat Sep 23 13:49:37 EDT 2006
Yeah all they would have to do is patch this function:
http://us2.php.net/manual/en/function.move-uploaded-file.php
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
> http://webxadmin.free.fr/article/php-move-file-211.php 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
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
More information about the talk
mailing list