LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Volker "Dähn Date: Sat Dec 20 01:58:11 2003 Subject: Fileupload on MAC-Browsers won't work
Hi,
The following script works on any browser on windows xp. But not on a
mac (osx)
It simply shows the temp-directoryname.
Is anybody out there who could help me to fix this problem?
How will the upload work with Safari?
Thanks for your help.
This is the form for the upload:
<form enctype="multipart/form-data" method="POST" name="NAForm"
action="IA.php?<?=SID?>">
<input type="file" name="BildDatei" maxlength="128" size="36" value="<?
echo $Bild; ?>">
<input type="hidden" name="MAX_FILE_SIZE" value="20480">
The following site checks the uplad and copies the file to a specific
folder:
// if the Picture was uploaded
if ($BildDatei!="" AND
is_uploaded_file($_FILES['BildDatei']['tmp_name'])) {
// Check for JPG
if ($_FILES['BildDatei']['type']=='image/pjpeg') {
// Move File
$TestFile=$UserCoverDir.$ISBNFeld.".jpg";
move_uploaded_file($_FILES['BildDatei']['tmp_name'], "$TestFile");
}
} else {
echo "Save unsuccesfull";
}
| Navigate in group php.lang at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |