SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jul 2003
    Location
    San Diego
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $_FILES Question

    I have a simple form like so:

    <form action="add_proc.php" method="POST" ENCTYPE="multipart/form-data">
    <input type="file" name="userfile" size="30>
    <input type="Submit" name="submit
    </form>

    add_proc.php is like so:
    <?
    $temp_name = $_FILES['userfile']['tmp_name'];
    $file_name = $_FILES['userfile']['name'];
    $file_type = $_FILES['userfile']['type'];
    $file_size = $_FILES['userfile']['size'];
    $result = $_FILES['userfile']['error'];

    $test = "Just a test";
    echo"$test";

    echo $temp_name . "<br>";
    echo $file_name . "<br>";
    echo $file_type . "<br>";
    echo $file_size . "<br>";
    echo $result . "<br>";
    ?>

    Now shouldn't i be seeing my file vars here? the test var renders to the page but no file info. Any ideas? Thanks folks -E

  2. #2
    SitePoint Member
    Join Date
    Jul 2003
    Location
    San Diego
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To anwser my own question yes i should see them. It seems theres some hardcore caching going on.

  3. #3
    PHP Otaku Gibb's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i've heard of problems where the directory PHP is setup to upload to being of the wrong permission types, so nothing actually uploads. Might want to see if your /tmp folder is set to 755 or not.

  4. #4
    SitePoint Member
    Join Date
    Jul 2003
    Location
    San Diego
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks Gibb, it was working but there was some serious latency between the time I hit save in homesite, (I'm working on a remote server), and the time the page was actually written to the server. its all good now. Thanks again.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •