Re: uploading file
| From: | Richard Lynch | Date: | Thu, 08 Feb 2001 08:40:30 +0000 |
| Subject: | Re: uploading file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38694@lists.php.net to get a copy of this message | ||
// Creates the image file with a timestamp
$timestamp = time();
$image= $timestamp.$picture_name;
if ($PLATFORM == "windows") {
$new_path = str_replace('^', '\\', $WINDOWS_PATH);
What's with the "^"?...
And, since \ is special in PHP, you are changing ^ to \? Why?
echo $picture;
if (is_uploaded_file($picture)) {
copy($picture, $new_path);
file://move_uploaded_file($picture, $new_path);
} else {
echo "Possible file upload attack: filename '$picture'.";
}
#add this:
echo "is_uploaded_file() failed.";
}
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm