Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts

    Uploading files - undefined index

    Well, trying to upload files here using code that works on other servers. I'm running on IIS / Apache (Win2000).

    I've trouble shooted this and can't seem to find the problem.

    I'm even getting an error using the PHP docs code.

    Example...

    File testUpload.php
    Code:
    <html>
    <body>
    <form enctype="multipart/form-data" action="upload.php" method="post">
    <input type="hidden" name="MAX_FILE_SIZE" value="30000">
    Send this file: <input name="userfile" type="file">
    <input type="submit" value="Send File">
    </form>
    </body>
    </html>
    File upload.php
    Code:
    <html>
    <body>
    <?php
    	print $_FILES['userfile']['name']."<br />";
    	print $_FILES['userfile']['type']."<br />";
    	print $_FILES['userfile']['size']."<br />";
    	print $_FILES['userfile']['temp_name']."<br />";
    ?>
    </body>
    </html>
    Here's the error messages I'm getting...
    Code:
    Notice: Undefined index: userfile in D:\WebPub\HOME\tmp\upload.php on line 4
    
    
    Notice: Undefined index: userfile in D:\WebPub\HOME\tmp\upload.php on line 5
    
    
    Notice: Undefined index: userfile in D:\WebPub\HOME\tmp\upload.php on line 6
    
    
    Notice: Undefined index: userfile in D:\WebPub\HOME\tmp\upload.php on line 7
    Any ideas??? An I missing a setting in php.ini???

  • #2
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Never mind, seems to have been a glitch on the Windows server. All works now.

    Gotta love those windows "features"

  • #3
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have the same problem. Can you help me, please?
    I am working in a Vista PC


  •  

    LinkBacks (?)


    Posting Permissions

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