简体   繁体   中英

PHP File Upload (form) isn´t working on webserver (local working on XAMPP)

in my Web-Project there´sa file upload form which is only working if I run it on my local XAMPP (Windows) Server. As soon as I deploy it on my Web Server (Linux / Plek), the upload does not working anymore and throw the following exeption:

Notice : Undefined index: formUploadFile in /var/www/vhosts/business-mates.com/httpdocs/mitglied/includes/easyAccounting/4.php on line 258

I have already proofed the php settings (max upload size and max post size). If I do an var_dump from the $_FILES Variable, there´s nothing in, so the file wasn´t uploaded:

array(0) { }

There´s the form:

<form method="post" enctype="multipart/form-data">
        <input type="hidden" id="formUpload" name="formUpload">
        <input type="file" name="formUploadFile" required>
        <label for="ds" >Hiermit willige ich ein, dass die eingegebenen Daten zur Bearbeitung meines Anliegens gespeichert und verarbeitet werden. Folgende Daten werden an die EK Frachtenservice übermittelt: Alle Daten welche im Formular angegeben sind.
            <input type="checkbox" id="ds" name="ds" required>
            <span class="checkmark"></span>
        </label>
        <input type="submit" value="Antragsformulare hochladen" name="submit" id="send">
    </form>

The expected result is, that the file is located / uploaded in $_FILES as well as it is on my local XAMPP-Server.

Thanks for your suggestions in advance Christian

Thanks RadicalDingos,

that was the issue.

What a fool I am...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM