Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Datei-Upload mit HTML_QUICKFORM funktioniert nicht.

Empfohlene Antworten

Veröffentlicht

Hallo,

Ich freue mich immer wieder über solche Foren, dieses hier hat mir schon oft weitergeholfen. Lob und Dank an die Admins und Moderatoren.

Nun hab ich ein Problem:

Das Folgende Script wirft immer die Meldung:

Du musst eine Datei wählen

...obwohl ich eine ausgewählt habe.


<?php
require_once "HTML/QuickForm.php";
$uploadForm = new HTML_QuickForm('upload_form', 'post');
$path = "/imgages/thumbs";
$file =& $uploadForm->addElement('file', 'filename', 'File:');
$uploadForm->addRule('filename', 'Du musst eine Datei wählen', 'uploadedfile');
$uploadForm->addElement('submit', 'btnUpload', 'Upload');
if ($uploadForm->validate()) {
$uploadForm->process('process', true);
}
else {
$uploadForm->display();
}

function process($values) {
global $file;
if ($file->isUploadedFile()) {
$file->moveUploadedFile($path);
}
else {
print "Keine Datei hochgeladen!";
}
}
?>
[/PHP]

Ich weiß nicht, woran es hakt. Hat jemand einen Tip? Wäre für jeden dankbar.

Ich denke mal, QUICKFORM ist richtig installiert, weil viel komplexere Formulare super funktionieren.

Vielen Dank im Voraus. :(

  • 2 Monate später...

Ich werd noch wahnsinnig. Ich bekomme es zwar hin, aber nur wenn ich ACTION = POST explizit in den Code schreibe. Aber das sollte doch eigentlich der Konstruktor machen, oder stehe ich dermaßen auf dem Schlauch??

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.