Voting

: max(four, eight)?
(Example: nine)

The Note You're Voting On

MBorgPL at gmail dot com
16 years ago
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;
}
?>

<< Back to user notes page

To Top