uploading file error

    Date: 01/31/07 (PHP Community)    Keywords: php

    I'm at a loss for what is causing this error and not moving an uploaded file, if someone could take a look at the code and see what I might be missing would be appreciated,
    here is the output:
    Upload: 617.txt
    Type: text/plain
    Size: 8.900390625 Kb
    Stored in: /tmp/phpMhLXr8
    Warning: move_uploaded_file(1/617.txt): failed to open stream: No such file or directory in /mnt/w0701/d15/s12/b0287a72/www/media-n.org/playlist/upload_file2.php on line 18

    Warning: move_uploaded_file(): Unable to move '/tmp/phpMhLXr8' to '1/617.txt' in /mnt/w0701/d15/s12/b0287a72/www/media-n.org/playlist/upload_file2.php on line 18
    Stored in: 1/617.txt1

    and the code block:


    {
    if ($_FILES["file"]["error"] > 0)
    {
    echo "Error: " . $_FILES["file"]["error"] . "
    ";
    }
    else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "
    ";
    echo "Type: " . $_FILES["file"]["type"] . "
    ";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb
    ";
    echo "Stored in: " . $_FILES["file"]["tmp_name"];

    $path = mkdir ("./" . date("YMDHis"), 0777);
    move_uploaded_file($_FILES["file"]["tmp_name"], $path . "/" . $_FILES["file"]["name"]);
    echo "Stored in: " . $path . "/" . $_FILES["file"]["name"];
    echo $path;
    }
    }

    Source: http://community.livejournal.com/php/536143.html

« database results not posting? || phpdoc for php5 »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home