Socke
14.08.2006, 10:55
Hallo,
weiß jemand, wie ich in PHP ein Upload Skript schreibe für den IE ?
Ich habe bis jetzt aus Code-Schnipseln mal was zusammen gebastelt, funktioniert aber nicht.
Hier mal der Quellcode (Sorry Mike bleibt auch der einzigste ;) )
<html>
<head>
<title>Hammer - Portal - Upload</title>
<style type="text/css">
<!--
a:link { font size:12px; family:verdana; color:#878787; text-decoration:none;}
a:visited { font size:12px; family:verdana; color:#878787; text-decoration:none;}
a:hover { font size:12px; family:verdana; color:#FF9C00; text-decoration:none; font-weight: bold}
a:active { font size:12px; family:verdana; color:#878787; text-decoration:none;}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" size="1" leftmargin="5" topmargin="5" marginwidth="0" marginheight="0">
<?
if ($senden) {
$pfad = "\upload";
$sizeabfrage = "no";
$size = "20";
$body="<html><body bgcolor=#FFFFFF text=#000000>";
if ($file_name == "") {
echo $body;
die("Keine Datei gewählt.");
}
if ($sizeabfrage == "yes") {
if ($file_size > $size) {
echo $body;
die("Die Datei ist zu groß !");
}
}
$upload = "$file_name";
@copy($file, "$pfad/$upload") or die($body."Datei wurde nicht hochgeladen.");
echo $body;
echo "Datei hochgeladen";
}
else {
?>
<html>
<body bgcolor=#FFFFFF text=#000000 link=#ccff88 vlink=ccff88 alink=#ccff88>
<form action="<?php $PHP_SELF; ?>"method="post" enctype="multipart/form-data">
<p>Bitte Datei auswählen:<br>
<input type=file name=file>
<p><button name="senden" type="submit">Hochladen</button>
</form>
</body>
</html>
<?
}
?>
</body>
</html>
Danke schonmal :help:
weiß jemand, wie ich in PHP ein Upload Skript schreibe für den IE ?
Ich habe bis jetzt aus Code-Schnipseln mal was zusammen gebastelt, funktioniert aber nicht.
Hier mal der Quellcode (Sorry Mike bleibt auch der einzigste ;) )
<html>
<head>
<title>Hammer - Portal - Upload</title>
<style type="text/css">
<!--
a:link { font size:12px; family:verdana; color:#878787; text-decoration:none;}
a:visited { font size:12px; family:verdana; color:#878787; text-decoration:none;}
a:hover { font size:12px; family:verdana; color:#FF9C00; text-decoration:none; font-weight: bold}
a:active { font size:12px; family:verdana; color:#878787; text-decoration:none;}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" size="1" leftmargin="5" topmargin="5" marginwidth="0" marginheight="0">
<?
if ($senden) {
$pfad = "\upload";
$sizeabfrage = "no";
$size = "20";
$body="<html><body bgcolor=#FFFFFF text=#000000>";
if ($file_name == "") {
echo $body;
die("Keine Datei gewählt.");
}
if ($sizeabfrage == "yes") {
if ($file_size > $size) {
echo $body;
die("Die Datei ist zu groß !");
}
}
$upload = "$file_name";
@copy($file, "$pfad/$upload") or die($body."Datei wurde nicht hochgeladen.");
echo $body;
echo "Datei hochgeladen";
}
else {
?>
<html>
<body bgcolor=#FFFFFF text=#000000 link=#ccff88 vlink=ccff88 alink=#ccff88>
<form action="<?php $PHP_SELF; ?>"method="post" enctype="multipart/form-data">
<p>Bitte Datei auswählen:<br>
<input type=file name=file>
<p><button name="senden" type="submit">Hochladen</button>
</form>
</body>
</html>
<?
}
?>
</body>
</html>
Danke schonmal :help: