开发者

uploading a file and then copying it to two differnt directories?

i know this is a very basic question and i know i have done it before its just htta i cant seem to track the code or get the answer on the web... let me explain...

i am uploading a image

i want the original image in one dir and i want to create a thumbnail and tore that in another dir..开发者_运维技巧..i plan on using class.upload (verot.net)

i wanted to know if i can move_uploaded_file twice if not how do i do it..


Well, firstly use move_uploaded_file($tmp, $dest) and secondly copy($dest, $dest2)

Btw, your class should be able to save thumbnail by any path, different from the source image.

/me to the rescue ;-)


If you want to make a copy of a file in a new location, use the copy() function: http://us2.php.net/manual/en/function.copy.php

This won't do anything to create a thumbnail, though; this will just duplicate the same file in two places. To create a thumbnail, you may consider using PHP's GD image processing functions: http://us2.php.net/manual/en/refs.utilspec.image.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜