Problem writing file uploads.
Posted: Tue Nov 12, 2002 9:49 am
This is the script recording the file:
The server is unix, PHP 4.2.2, Apache/1.3.26
The server root is "/data"
My website root is "/data/web/72590/www"
The script is located in "/data/web/72590/www/utility"
The "images" subdirectory of "utility" has been CHMOD to 777.
It echos "File write failed: image.gif" no matter what $DestDir I use.
I have tried:
Any help with what I'm doing wrong?
Code: Select all
<?php
if (is_uploaded_file($_FILESї'userfile']ї'tmp_name']))
{
$DestDir = "/data/web/72590/www/utility/images/";
if (@move_uploaded_file($_FILESї'userfile']ї'tmp_name'], $DestDir) == FALSE)
echo "File write failed: " . $_FILESї'userfile']ї'name'];
else echo "Uploaded file: " . $_FILESї'userfile']ї'name'];
}
else
{
echo "File upload failed: " . $_FILESї'userfile']ї'name'];
}
?>The server root is "/data"
My website root is "/data/web/72590/www"
The script is located in "/data/web/72590/www/utility"
The "images" subdirectory of "utility" has been CHMOD to 777.
It echos "File write failed: image.gif" no matter what $DestDir I use.
I have tried:
Code: Select all
$DestDir = "/data/web/72590/www/utility/images/";
$DestDir = "images/";
$DestDir = "./utility/images/";
$DestDir = "./web/72590/www/utility/images/";