开发者

PHP set an image on my server as uploaded temp file

I am editing a photo gallery script to allow the use of TIFF to be uploaded and saved, but i must keep the files in jpg format also for web viewing. What I have done is installed image magick to convert TIF to JPEG, once i have it converted I want the script to continue with making thumbnails, zoom images, etc. it makes them from $_FILES['image']['tmp_name']

Is there a way to set my newly created file as $_FILES['image']['tmp_name']? my new jpeg file path is set to $nw.

basical开发者_如何学JAVAly I need

    $nw='path/to/newfile.jpg';
$_FILES['image']['tmp_name']=$nw;

but it does not work. any ideas?


If you need to work on the same file across multiple page requests, move it somewhere safe using move_uploaded_file.

If the functions that you wrote require access to $_FILES['image']['tmp_name'], rewrite them to accept the name of the file as a parameter and call them using the new location of the file as argument.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜