SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict nimasdj's Avatar
    Join Date
    Dec 2007
    Posts
    298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    submitting a file

    I have this form:
    <form method="POST" action="<?=$_SERVER['PHP_SELF']?>" enctype="multipart/form-data">
    <input type="file" name="data" size="30">

    but after submiting:
    ******* $handle = file($_FILES['data']['tmp_name']);

    $handle is empty. It seems $_FILES is empty. what wrong I did? What should I look into to see why not working? Is there any setting in php.ini I should check too?

  2. #2
    SitePoint Guru bronze trophy
    Join Date
    Feb 2013
    Posts
    725
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    That would be
    PHP Code:
    $handle $_FILES['data']['name']; 


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
  •