problem beim uploaden

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Mach mal ein var_dump($_SERVER['DOCUMENT_ROOT']) und poste die Ausgabe davon hier. Ich vermute dass php glaubt dein /httpdocs Verzeichnis wäre direkt im Root. So zumindest würde ich ein / am Anfang des Pfades interpretieren

    Gruss

    tobi
    Gutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten

    [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
    Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)

    Comment


    • #17
      Hier:
      PHP Code:
      $source $_FILES['fupload']['tmp_name'];
      $target "/httpdocs/upload/upfile/".$_FILES['fupload']['name'];
      move_uploaded_file($source$target

      Comment


      • #18
        Wo ist jetzt echo $_SERVER['DOCUMENT_ROOT'].
        Wie gesagt ich vermute er sucht das Verzeichnis in Root und dort liegt es definitiv nicht.

        Gruss

        tobi
        Gutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten

        [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
        Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)

        Comment


        • #19
          was sagen file_exists() und is_dir() dazu?

          Comment


          • #20
            Mit DOCUMENT_ROOT hatte ich es auch shcon versucht und es wurde wieder der selbe fehler angezeigt. file exist => kann das file nicht finden

            Comment


            • #21
              Und genaus so hast du es auch probiert ? Je nachdem wie dein Doc Root ausschaut müsstest du ggf noch httpdocs mit in den Pfad nehmen.
              Aber wie genau der ausschaut weiss ich ned weil du die Ausgabe nie gepostet hast
              PHP Code:
              $target $_SERVER['DOCUMENT_ROOT'].'/upload/upfile/'.$_FILES['fupload']['name']; 
              Gruss

              tobi
              Gutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten

              [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
              Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)

              Comment


              • #22
                Also hier:
                das gibt var_dump(..) aus:


                string(37) "/srv/www/vhosts/lightdisc.de/httpdocs" string(37) "/srv/www/vhosts/lightdisc.de/httpdocs"

                Comment


                • #23
                  Also wenn
                  "/srv/www/vhosts/lightdisc.de/httpdocs
                  dann müsste es aber eigentlich funzen mit DocRoot und der Pfadangabe hintendrann.
                  Sonst ist dein php hinüber

                  Gruss

                  tobi
                  Gutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten

                  [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
                  Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)

                  Comment


                  • #24
                    Also habs jetzt hinbekommen. War eigentlich ganz blöd und ich versteh immer noch net warum es net auch vorher gegangen ist:

                    PHP Code:
                    $target $_FILES['fupload']['name'];
                    move_uploaded_file($source"./upfiles/".$_FILES['fupload']['name']); 
                    So funktioniert es jetzt ohne Probleme. Trotzdem danke!

                    Comment

                    Working...
                    X