I've coded a system which allows the upload of image files to a particular directory. This is all very well and good, and works fine - except when using Safari on a Mac.
In this case, the tmp_name is the one being saved to the database i.e. the absolute path to the .tmp file e.g. "C:\php4\uploads\php4E5F.tmp". From Windows, it's fine. Anyone ever seen it or have any ideas?
Server is Win2K, PHP 4.3.10, ISAPI modePHP Code:if ( ! is_dir( $new_file_path ) )
{
mkdir( $new_file_path );
}
if ( ( $_FILES['logo_1']['type'] == "image/gif" ) || ( $_FILES['logo_1']['type'] == "image/pjpeg" ) )
{
move_uploaded_file( $_FILES['logo_1']['tmp_name'], $new_file_path . $_FILES['logo_1']['name'] )
or die ("Could not save logo 1");
$logo_1 = $web_file_path . $_FILES['logo_1']['name'];
}
if ( ( $_FILES['logo_2']['type'] == "image/gif" ) || ( $_FILES['logo_2']['type'] == "image/pjpeg" ) )
{
move_uploaded_file( $_FILES['logo_2']['tmp_name'], $new_file_path . $_FILES['logo_2']['name'] )
or die ("Could not save logo 2");
$logo_2 = $web_file_path . $_FILES['logo_2']['name'];
}




Bookmarks