php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2004-2

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 25.12.2004, 20:04  
Gast
 
Beiträge: n/a
Standard Problem bei Bildupload

Hallo,

habe das Problem, dass der Name des Bildes nicht übertragen wird. Wo liegt das Problem?

Ich lande immer bei Bild Upload: fehlgeschlagen!

image - Name des Inputfeldes

Code:
// image upload
  $uploaddir = images/;
  $image = $_FILES['image'];

  if (move_uploaded_file(FILES['image']['tmp_name'], $uploaddir.$image)) {
	echo 'Bild Upload: Erfolgreich!
';

// print_r($_FILES);	// Debug-Infos 
  } else {
    echo 'Bild Upload: fehlgeschlagen!';
   	echo '<pre>';
	  print_r($_FILES);	// Debug-Infos  
  }
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 25.12.2004, 20:09  
Gast
 
Beiträge: n/a
Standard

$image ist doch dann ein Array, dass du nicht bei move_uploaded_file benutzen kannst, versuche es mal so:

if (move_uploaded_file(FILES['image']['tmp_name'], $uploaddir.$_FILES['image']['name']))

Gruß
phpfan
 
Alt 25.12.2004, 20:33  
Gast
 
Beiträge: n/a
Standard Re: Problem bei Bildupload

Zitat:
Zitat von sbridge
Ich lande immer bei Bild Upload: fehlgeschlagen!
Falsch. Dieses Script wird wegen Syntaxerror in der 2. Zeile abgebrochen.
 
Alt 25.12.2004, 20:34  
Gast
 
Beiträge: n/a
Standard

danke
hat sich erledigt.

hab vergessen das Attribut enctype="multipart/form-data" des Form-Tags.
 
Alt 26.12.2004, 00:04  
Gast
 
Beiträge: n/a
Standard

Zitat:
hab vergessen das Attribut enctype="multipart/form-data" des Form-Tags.
Das mag auch ein Grund sein, aber der Error in Zeile 2 muss beseitig werden!
PHP-Code:
$uploaddir "images/"
 
 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
[Erledigt] Galerie Problem... coraplanet PHP Tipps 2008 4 06.06.2008 13:42
Problem mit Bildupload Charly Shop Sui PHP Tipps 2006 2 14.07.2006 12:30
datensätze defekt oder problem mit dem einlesen? Ministry Datenbanken 4 06.07.2006 18:42
Problem mit Bildupload 2wuck PHP Tipps 2006 2 03.07.2006 07:05
Problem beim Bildupload/ Thumbnailerstellen imported_FlasH PHP Tipps 2006 2 02.03.2006 08:12
problem!!! PHP Tipps 2006 6 08.02.2006 11:06
[Erledigt] wieder ein Problem bei phpmailer und smtp PHP Tipps 2006 24 07.02.2006 01:07
Problem beim Bildupload PHP Tipps 2005-2 2 11.09.2005 19:30
Problem mit Weiterleitung PHP Tipps 2004-2 16 22.12.2004 17:49
Smarty und PHP-Skript Problem PHP Tipps 2004-2 2 03.12.2004 22:27
Problem mit alter JavaScript-Funktion woods PHP Tipps 2004 1 13.08.2004 13:34
Problem: Bildupload und Größenänderung geht nur lokal PHP Tipps 2004 4 08.08.2004 18:00
[Erledigt] Problem mit Timestamp! PHP Tipps 2004 24 08.06.2004 19:51
Login Problem PHP Tipps 2004 4 04.06.2004 18:46
foreach problem mAy^daY PHP Tipps 2004 3 02.06.2004 20:29

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
bildupload fehlgeschlagen (code 6)

Alle Zeitangaben in WEZ +2. Es ist jetzt 01:46 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.