Yea, I guess I should have stripped out some of the special code before I
posted. The ^ replaces \ when the user inserts the windows path, than I
replace the ^ with \\ so the path works correctly.
I did get this to work. I was sure fighting it though...
- Shane
DISCLAIMER: I am by no means an expert on this, or any other, topic...
----- Original Message -----
From: "Richard Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 3:40 AM
Subject: Re: [PHP] uploading file
> // 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
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]