Ankündigung

Einklappen
Keine Ankündigung bisher.

Problem bei Move File Upload

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Problem bei Move File Upload

    Hallo leute habe ein move file upload sript erstellt
    ist blos irgendwo ein fehler wen man upload dabei funktioniert alles es kommt erfolgreich hochgeladen die email kommt mit all infomation an blos der inhalt ladet nicht auf server also in der Verzeichnis nichts drine.

    könnt ihr bitte mir helfen wo der fehler sein könnt


    PHP-Code:
    <table cellpadding="0" width="400" border="0"  cellspacing="0" height="22">
                    <tr>
                      <td align="middle" width="197"  height="1" style="border-style: none; border-width: medium"><div class="Stil13" align="center"> <strong><font size="1">MP3</font></strong></div></td>
                      <td align="middle" width="189"  height="1" style="border-style: none; border-width: medium"><div class="Stil13" align="center"> <strong><font size="1">Promo</font></strong></div></td>
                    </tr>
                    <tr >
                      <td height="20"   style="border-style: none; border-width: medium"><div align="center">
                        <input type="radio" value="MP3" name="b">
                      </div></td>
                      <td height="20"  style="border-style: none; border-width: medium"><div align="center">
                        <input type="radio" value="Promo" name="b">
                      </div></td>
                    </tr>
                  </table>
                  <?php
    if(isset($_POST["do"]) && $_POST["do"] == "insert")
    {
        if(empty(
    $_POST["interpret"]) || empty($_POST["titel"]) || empty($_POST["email"]) || empty($_FILES['upload']['name']))
        {
            echo 
    "<strong class='error'>Bitte alle Felder ausf&uuml;llen!</strong>";
        }
        else
        {
            if(
    $_FILES['upload']['size'] > $maxuploads)
            {
                echo 
    "<strong class='error'>Bitte nicht mehr als $maxupload MB Hochladen!</strong>";
            }
            else
            { 
    $format            =    $_FILES['upload']['name'];
                if(
    strtolower(substr($format, -4)) == ".mp3" || substr($format, -4) == ".MP3")
                {
                    
    move_uploaded_file($_FILES['upload']['tmp_name'], $uploadziel.'/'.basename($_FILES['upload']['name']));
                    
    mail($mail$betreff$message);
                    echo 
    "<strong class='erfolg'>Erfolgreich hochgeladen...Wir melden uns so schnell wie es nur geht!</strong>";
                    echo 
    "<br><br>Upload Track: " $_FILES['upload']['name'];
                }
                else
                {
                    echo 
    "<strong class='error'>Bitte nur MP3 dateien Hochladen.</strong>";
                }
            }
        }
    }
    ?>


    PHP-Code:
    </div>
                  <table cellspacing="0" cellpadding="0" width="100%" border="0">
                    <tr>
                      <td height="26" align="right">Interpret:*</td>
                      <td width="75%" height="26" align="left">&nbsp; <?php echo '<input name="interpret" size="40" type="text">'?></td>
                    </tr>
                    <tr>
                      <td height="26" align="right">Titel:*</td>
                      <td width="75%" height="26" align="left">&nbsp; <?php echo '<input name="titel" size="40" type="text">'?></td>
                    </tr>
                    <tr>
                      <td height="26" align="right">E-Mail:*</td>
                      <td height="26" width="75%" align="left">&nbsp; <?php echo '<input name="email" size="40" type="text">'?></td>
                    </tr>
                    <tr>
                      <td height="26" align="right">Genre:*</td>
                      <td height="26" width="75%" align="left">&nbsp; <?php echo '<select name="genre">
                              <option>Rap</option>
                              <option>Hip Hop</option>
                              <option>RnB</option>
                              <option>Pop</option>
                              <option>Shancon</option>
                              <option>Remix</option>
                              <option>House</option>
                              <option>Dance</option>
                          </select>'
    ?></td>
                    </tr>
                    <tr>
                      <td height="26" align="right"><p style="margin-top: 0; margin-bottom: 0">Upload:*</td>
                      <td height="26" width="75%" align="left">&nbsp; <?php echo '<input name="upload" type="file" size="30">'?></td>
                    </tr>
                    <tr>
                      <td height="0" align="right">&nbsp;</td>
                      <td width="75%" height="0" align="left">&nbsp;&nbsp;
                        <?php  echo "<strong>Nur MP3 Format!</strong>"?></td>
                    </tr>
                    <tr>
                      <td height="0" align="right">&nbsp;</td>
                      <td height="0" width="75%" align="left">&nbsp;&nbsp;<?php echo "max. <strong>" $maxupload "</strong> MB"?></td>
                    </tr>
                    <tr>
                      <td height="38" align="right">&nbsp;</td>
                      <td height="38" width="75%" align="left">&nbsp; <?php echo '<input name="do" value="insert" type="hidden"><input name="submit" value="MP3 Hochladen" type="submit">
                            <input name="reset" value="Reset" type="reset">'
    ?></td>
                    </tr>
                  </table>

  • #2
    move_uploaded_file hat einen Rückgabewert, den man auswerten kann.

    Und per einfacher Kontrollausgabe mal zu schauen, ob der Pfad, den du dir da zusammen bastelst, auch dem entspricht, was du annimmst, ist auch etwas, was man eigentlich gemacht haben könnte, bevor man fragt.

    Kommentar


    • #3
      PHP-Code:
      $uploadziel 
      verweist wo genau hin? Im Scriptausschnitt undefiniert...

      in jedem Fall error_reporting hochschrauben

      Kommentar

      Lädt...
      X