Pit: PHP upload register_globals = Off

Beitrag lesen

Hallo:

Ich bekomme mit POST gar nichts übermittelt.

Und mit GET nur $_GET["file_upload"].

phpinfo(), http://selfaktuell.teamone.de/artikel/phpasp/php-uploadcheck/index.htm etc. haben mich leider auch nicht weitergebracht.

Pit

<html>
<head>
<title>
</title>
</head>
<?php

if(isset( $_GET["file_upload"]))
{
print "path: ".$_GET["file_upload"]."<br>";
print "name: ".$_GET["file_upload_name"]."<br>";
print "size: ".$_GET["file_upload_size"]." bytes<br>";
print "type: ".$_GET["file_upload_type"]."<p>";

if($_GET["file_upload_type"] == "image/gif")
{

$file_upload_directory = "upload";

copy ( $_GET["file_upload"], "$file_upload_directory/$file_upload_name");

print "<img src="".$file_upload_directory."/".$file_upload_name."">";

}

}
?>
<body>
<form enctype="multipart/form-data" action="<?php print $_SERVER["PHP_SELF"]; ?>" method="GET">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<!-- 100000 Bytes entspricht 100KB. -->

<!--

php.ini
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

-->

<input type="file" name="file_upload"><br>
<input type="submit" value="Datei hochladen">
</form>
</body>
</html>