note 87881 added to function.imagecopyresampled
| From: | MBorgPLatgmaildotcom at osu1 dot php dot net | Date: | Sun, 28 Dec 2008 18:53:23 +0000 |
| Subject: | note 87881 added to function.imagecopyresampled | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148620@lists.php.net to get a copy of this message | ||
Another addition to zorroswordsman at gmail dot com's resize class.
The function takes $_FILES['sent_image'] as 1st parameter. The 2nd is complete destination
path.
It only moves images.
It returns destination path if succeeded, and false if any error occurred.
<?php
public function move_image($tmp_img, $dest_img)
{
//verifies if the uploaded file is an image
if (strpos($tmp_img['type'], 'image') !== false)
{
//moves the uploaded file into the destination place
if (move_uploaded_file($tmp_img['tmp_name'], $dest_img)) {
return $dest_img;
}
}
return false;
}
?>
----
Server IP: 82.160.94.10
Probable Submitter: 83.6.110.242
----
Manual Page -- http://www.php.net/manual/en/function.imagecopyresampled.php
Edit -- https://master.php.net/note/edit/87881
Del: integrated -- https://master.php.net/note/delete/87881/integrated
Del: useless -- https://master.php.net/note/delete/87881/useless
Del: bad code -- https://master.php.net/note/delete/87881/bad+code
Del: spam -- https://master.php.net/note/delete/87881/spam
Del: non-english -- https://master.php.net/note/delete/87881/non-english
Del: in docs -- https://master.php.net/note/delete/87881/in+docs
Del: other reasons-- https://master.php.net/note/delete/87881
Reject -- https://master.php.net/note/reject/87881
Search -- https://master.php.net/manage/user-notes.php