note 15928 added to features.file-upload
| From: | badmaster at gmx dot ch | Date: | Tue, 09 Oct 2001 09:43:07 +0000 |
| Subject: | note 15928 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18713@lists.php.net to get a copy of this message | ||
You should include the filename and u should check the directory! how to do that? create a php file
with a error (syntax or sth) then put it in the directory where the files should be uploaded and
voila there u go with the correct dir!
But I'm having problems with that myself... seems like my server ignores the function...
///// datei-test.php \\\\\
<html>
<head>
<title>Test</title>
</head>
<body>
<form METHOD="POST" ACTION="upload.php"
ENCTYPE="multipart/form-data">
<p><input TYPE="FILE" NAME="userfile"
SIZE="50"><br>
<input type="text" name="dateiname" size="50"><br>
<input TYPE="SUBMIT" VALUE="Upload"> </p>
</form>
<br><b>
<a href="datei-test.php">Back</a></b>
</body>
</html>
//// upload.php \\\\\
<?
if(isset($userfile))
{
$erster = "1.ja";
if (is_uploaded_file($userfile)) {
$destination = "/home4/tac/public_html/uploads";
$ging_es = move_uploaded_file($userfile,$destination . $dateiname);
if($ging_es)
{
echo "ES GING!!!";
}
}
}
echo "<br><br><B>Daten:</b><br>Destination:
$destination<br>$erster<br>Userfile: $userfile<br>Ging
es?:$ging_es<br>";
?>
<a href="datei-test.php">Back</a></b>
IF anyone knows what is wrong plz write me an E-Mail!!! thnx!
--
http://www.php.net/manual/en/features.file-upload.php
http://master.php.net/manage/user-notes.php?action=edit+15928
http://master.php.net/manage/user-notes.php?action=delete+15928
http://master.php.net/manage/user-notes.php?action=reject+15928